Support fully direct request/responses (#9455)

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Eric Severance
2026-01-28 12:14:01 -08:00
committed by GitHub
parent 571c1ac34c
commit f710cd6ecb
3 changed files with 9 additions and 6 deletions

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
}