You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cancel pending requests when a device leave or rejoins - #92
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Active issues leave stale route-discovery entries after discovery removal and allow queued Leave requests to survive a rejoin, potentially forcing a freshly rejoined device to leave again.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Rejoin cleanup leaves stale sends and old-address state active and accepts outdated leave reports, allowing prior-session traffic or events to disrupt the new session.
For a secured rejoin under a different short address, this overwrites the old mapping before handle_rejoin_request calls update_nwk_eui64_mapping. That helper then sees the new address as previous_nwk, leaving the old address's cached routes, pending discoveries, and route-request broadcasts intact. Skip this cache update for RejoinRequest frames so the rejoin handler can invalidate the previous address before replacing its mapping.
Reset route discoveries originated by the rejoining device
crates/ziggurat-zigbee/src/nwk/routing.rs:297
This retains discoveries originated by the rejoining device, even though its route-request identifier can restart with the new session. A new request reusing an old identifier is then compared against the previous session's forward_cost in accept_route_request and is rejected if its new path costs more; relayed replies can also be rejected against the stale residual_cost. Reset discovery state originating at the rejoining nwk, not only our discoveries targeting it, while keeping any necessary late-copy suppression separate.
Prevent failed in-flight indirect sends from requeueing after rejoin
An indirect frame already transmitting when the device rejoins is skipped here, but it can still be retried afterward: on a failed radio report, transmitted returns it to AwaitingPoll while its persistence deadline remains live. If that frame is the stale-child leave request, the rejoined device receives it on its next poll and is told to leave again. Although the current copy cannot be recalled, mark the in-flight record as cancelled so its report settles it rather than requeueing it.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Rejoin handling leaves pending sends and route-request broadcasts active for the previous address and can drop valid replies for retained relayed discoveries, causing router timeouts.
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
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.
When a device rejoins, pending route requests to it will not be answered and all pending requests to it should be invalidated.
Should address #88 alongside #89.