Skip to content

Conversation

@elenaf9
Copy link
Contributor

@elenaf9 elenaf9 commented Jul 8, 2025

Contribution description

gnrc_rpl_dodag_remove_all_parents sets the node's rank to GNRC_RPL_INFINITE_RANK, so checking the (old) rank should be done before that function call.

Testing procedure

See Testing procedure in #21586.

Issues/PRs references

Came up while testing #21586.

`gnrc_rpl_dodag_remove_all_parents` sets the node's rank in the DODAG to
`GNRC_RPL_INFINITE_RANK`, so checking the (old) rank should be done
before that function call.
@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System labels Jul 8, 2025
@crasbe crasbe added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Jul 8, 2025
@riot-ci
Copy link

riot-ci commented Jul 8, 2025

Murdock results

✔️ PASSED

2d4542e gnrc/rpl: check old rank before removing parents

Success Failures Total Runtime
10503 0 10504 19m:34s

Artifacts

Copy link
Contributor

@Teufelchen1 Teufelchen1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. You tested it, right? (and it's not just an unchecked finding while reading code)

@elenaf9
Copy link
Contributor Author

elenaf9 commented Jul 17, 2025

LGTM. You tested it, right? (and it's not just an unchecked finding while reading code)

Yes :) I tested initially with #21586, and just now again also on the current master.

Without this fix, there is some weird ping pong behavior where a parent, after local_repair was triggered, becomes a child of their own child. Both nodes, former parent and child, believe to be each other's children, resulting in a lot of DIOs being sent back and forth that each time decrease the rank, slowly converging towards the INFINITE_RANK.
With this PR's fix, both parent and child immediately set their rank to INFINITE_RANK without the above behavior.

I assume that the reason is that without the fix the if-branch is skipped and the trickle timer not reset, resulting in the child not being informed of the poisoned (i.e. infinite) parent rank.

@Teufelchen1 Teufelchen1 added this pull request to the merge queue Jul 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 17, 2025
@Teufelchen1 Teufelchen1 added this pull request to the merge queue Jul 21, 2025
Merged via the queue into RIOT-OS:master with commit 1c1bbf3 Jul 21, 2025
29 checks passed
@elenaf9 elenaf9 deleted the rpl/fix-local-repair branch July 21, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants