Prevents Topology Infinite Loop#142
Open
matt001k wants to merge 2 commits into
Open
Conversation
If running a topology request on the root node, this prevents an infinite loop from occurring by ensuring that the topology cursor cannot be changed if the neighbor request retry limit has been hit.
victorsowa12
reviewed
May 8, 2026
Contributor
victorsowa12
left a comment
There was a problem hiding this comment.
Talked IRL with Matt.
He has found another area that fixes the condition that causes the infinite loop be switching a == check to a <= check.
We also discussed potentially removing the network_topology_move calls from here and having this timeout just send a check node event. This will require some more testing.
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.
What changed?
On a timeout event in the topology task, if on the root node, prevent changing the cursor.
How does it make Bristlemouth better?
If running a topology request on the root node, this prevents an infinite loop from occurring by ensuring that the topology cursor cannot be changed if the neighbor request retry limit has been hit.
Where should reviewers focus?
This prevents a node from hanging in the topology task and tripping the watchdog, but this does not prevent handling link up/down events from a non-ADIN device, such as the UART for
bm_sbc. Because of this behavior, when a UART device is no longer available, the topology task takes about 3 seconds to finish after waiting for all of the retries to occur (because the Bristlemouth stack still thinks the UART port is up).We need to think of a way to trigger
link_changeinl2.cfor the UART device, but that will have to occur when implementing the composite device.Checklist