Repository navigation
Drop the route record on any network status route failure - #96
Merged
puddly merged 1 commit intoNov 13, 2026
Merged
Conversation
A relay reporting LinkFailure, LegacyLinkFailure or LegacyNoRouteAvailable for a destination removed the routing table entry but kept its route record; only SourceRouteFailure dropped the record. Since route_to prefers the record, every later send to that destination took the same dead path until the record was replaced or the stack restarted. This happens when the concentrator's own transmission succeeds but the next device cannot forward it, e.g. a direct (relay-less) record for a router that moved out of range while another device still acks the frame. Routing::forget_route_to now drops both the route and the record, and handle_network_status uses it for every route failure status, so the next send falls back to route discovery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
handle_network_statushandledLinkFailure,LegacyLinkFailureandLegacyNoRouteAvailableby removing only the routing table entry. The route record was dropped only forSourceRouteFailure. Becauseroute_toprefers the route record, later sends to that destination kept using the stale path until a new route record replaced it or the stack restarted.We hit this with a direct (relay-less) route record for a router that had moved. The coordinator's transmission was MAC-acked by another device, so
handle_unicast_send_failurenever ran. The only failure signal was theLinkFailurenetwork status, and every toggle failed until a restart.Change
Routing::forget_route_to(destination)removes both the routing table entry and the route record, and returns whether a record was removed.handle_network_statususes it for all four route-failure statuses, so the next send falls back to route discovery.routing.rscover direct and source-route records, the routing entry, and leaving other destinations untouched.Testing
cargo test -p ziggurat-zigbee -p ziggurat-drivercargo clippy -p ziggurat-zigbee -p ziggurat-driver --all-targets -- -D warnings -Dclippy::all -Dclippy::nurserycargo fmt --all --checkThe driver-side wiring has no unit test.
🤖 Generated with Claude Code