Fix replies dropped when flood.max.unscoped is low - #3106
Open
ViezeVingertjes wants to merge 2 commits into
Open
Fix replies dropped when flood.max.unscoped is low#3106ViezeVingertjes wants to merge 2 commits into
ViezeVingertjes wants to merge 2 commits into
Conversation
…ting # Conflicts: # examples/simple_repeater/MyMesh.cpp
ViezeVingertjes
marked this pull request as ready for review
August 4, 2026 10:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 🤖