Display traceroutes with 0 hops (#4261)

This commit is contained in:
Eric Severance 2026-01-19 12:22:32 -08:00 committed by GitHub
parent afbec5d02a
commit 343fec2383
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,7 +39,9 @@ val MeshProtos.MeshPacket.fullRouteDiscovery: RouteDiscovery?
val fullRouteBack = listOf(sourceId) + routeBackList + destinationId
clearRouteBack()
if (hopStart > 0 && snrBackCount > 0) { // otherwise back route is invalid
// hopStart was not populated prior to 2.3.0. The bitfield was added in 2.5.0 and
// is used to detect versions where hopStart can be trusted to have been set.
if ((hopStart > 0 || hasBitfield()) && snrBackCount > 0) { // otherwise back route is invalid
addAllRouteBack(fullRouteBack)
}
}