Support fully direct request/responses (#9455)

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Eric SeveranceandBen Meadors authored and GitHub committed 2026-01-28 14:14:01 -06:00
1 parent 571c1ac34c
commit f710cd6ecb
3 files changed
+9 -6

No files matched your search

+2
View File
@@ -67,6 +67,8 @@ uint8_t RoutingModule::getHopLimitForResponse(const meshtastic_MeshPacket &mp)
#if !(EVENTMODE) // This falls through to the default.
return hopsUsed; // If the request used more hops than the limit, use the same amount of hops
#endif
} else if (mp.hop_start == 0) {
return 0; // The requesting node wanted 0 hops, so the response also uses a direct/local path.
} else if ((uint8_t)(hopsUsed + 2) < config.lora.hop_limit) {
return hopsUsed + 2; // Use only the amount of hops needed with some margin as the way back may be different
}