mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-15 22:37:35 +00:00
Tryfix nohop
This commit is contained in:
@@ -145,6 +145,18 @@ bool NextHopRouter::perhapsRebroadcast(const meshtastic_MeshPacket *p)
|
||||
tosend->hop_start -= (tosend->hop_limit - 2);
|
||||
tosend->hop_limit = 2;
|
||||
}
|
||||
#elif ARCH_PORTDUINO
|
||||
if (tosend->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&
|
||||
portduino_config.nohop_ports.size()) {
|
||||
for (const auto &port : portduino_config.nohop_ports) {
|
||||
if (port == tosend->decoded.portnum) {
|
||||
LOG_DEBUG("0-hopping portnum %u", tosend->decoded.portnum);
|
||||
tosend->hop_start -= tosend->hop_limit;
|
||||
tosend->hop_limit = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (p->next_hop == NO_NEXT_HOP_PREFERENCE) {
|
||||
|
||||
@@ -757,13 +757,6 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
|
||||
skipHandle = true;
|
||||
}
|
||||
}
|
||||
for (const auto &port : portduino_config.nohop_ports) {
|
||||
if (port == p->decoded.portnum) {
|
||||
p->hop_start -= p->hop_limit;
|
||||
p->hop_limit = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
printPacket("packet decoding failed or skipped (no PSK?)", p);
|
||||
|
||||
Reference in New Issue
Block a user