Fix replies dropped when flood.max.unscoped is low - #3106
Fix replies dropped when flood.max.unscoped is low#3106ViezeVingertjes wants to merge 2 commits into
Conversation
…ting # Conflicts: # examples/simple_repeater/MyMesh.cpp
|
Verified on hardware: two Xiao ESP32-S3 + Wio SX1262 boards (repeater under test and a Each case was run twice: once against this branch with the fix reverted, once with it applied.
|
|
Does this PR help to resolve this issue? IoTThinks/EasySkyMesh#100 |
Hmm, doesnt seem related, this is fixing the repeater sending unscoped flood packets for the login, which are dropped over hops with |
The repeater ignores the return path it already has, for logins only.
onPeerDataRecvchecksclient->out_path_lenbefore falling back to flooding a REQreply.
onAnonDataRecvnever did: it only looked atreply_path_len, whichhandleLoginReqdoes not set. A login arriving DIRECT is therefore always answered byflooding, even when the repeater holds a valid
out_pathfor that client.simple_room_serveralready had this check; only the repeater was missing it.Flooded replies go out un-scoped. A DIRECT request carries no transport codes, so
recv_pkt_regionis NULL andsendFloodReplyfell through tosendFlood(). Underflood.max.unscoped=0that reply dies at hop 0. Under the shipped default of 64 itinstead propagates across the whole mesh, which accounts for a lot of the REQ/RESP
flood traffic operators are seeing.
Changes
chooseReplyRoute(): a login arriving DIRECT replies via the client's storedout_path, matching what every other request type already does.chooseReplyScope(): when the requester's scope cannot be determined, reply in thenode's default Region instead of un-scoped. An un-scoped flood request is still
answered un-scoped, so paths that work today are unchanged.
src/helpers/RoutingPolicy.h, alongsideisFloodHopLimitExceeded()extracted from the copy in each firmware.test/test_routing_policy/.- Le Claude (mostly) 🤖