Fix NodeInfo suppression logic to ensure suppression only applies to external requests#9947
Merged
Conversation
…external requests
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts NodeInfo reply-suppression behavior so that suppression doesn’t accidentally block the device’s own periodic NodeInfo broadcasts, aligning suppression strictly with “replying to external requests”.
Changes:
- Adds clarifying comment around the 12-hour suppression window.
- Gates suppression in
allocReply()so it only applies when replying to a non-local (external) request.
Comments suppressed due to low confidence (1)
src/modules/NodeInfoModule.cpp:45
- The suppression flag is set for any promiscuously-sniffed packet with
want_response, even when the packet is not addressed to us (in which caseMeshModulewill never callsendResponse()for this module). That makessuppressReplyForCurrentRequestrepresent state that might never be consumed and can leak into later sends. Consider only computing/updating suppression when the request is actually eligible for a reply (sametoUscondition used inMeshModule::callModules: broadcast orisToUs(&mp)).
if (mp.decoded.want_response) {
const NodeNum sender = getFrom(&mp);
const uint32_t now = mp.rx_time ? mp.rx_time : getTime();
auto it = lastNodeInfoSeen.find(sender);
if (it != lastNodeInfoSeen.end()) {
uint32_t sinceLast = now >= it->second ? now - it->second : 0;
if (sinceLast < NodeInfoReplySuppressSeconds) {
suppressReplyForCurrentRequest = true;
}
}
lastNodeInfoSeen[sender] = now;
pruneLastNodeInfoCache();
You can also share your feedback on Copilot code review. Take the survey.
…quests which are actually nodeinfo packets
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts NodeInfoModule suppression so it only suppresses replies to external NodeInfo requests, preventing suppression from affecting the device’s own periodic NodeInfo broadcasts.
Changes:
- Avoids marking suppression based on packets originating from the local node (e.g., local/loopback sources).
- Applies suppression only when
allocReply()is servicing an external NodeInfo request (not periodic broadcasts).
You can also share your feedback on Copilot code review. Take the survey.
jeek
pushed a commit
to jeek/Meshtastic-Exploiteers-Hacker-Pager
that referenced
this pull request
Jun 30, 2026
…external requests (meshtastic#9947) * Fix NodeInfo suppression logic to ensure suppression only applies to external requests * Ensure NodeInfo reply suppression logic to only apply for external requests which are actually nodeinfo packets
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.
Based on some logs, it seems that the suppression was influencing our own periodic NodeInfo broadcasts