Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnrc_rpl: new default route when old one was deleted #5141

Conversation

cgundogan
Copy link
Member

Currently, when a node has two parents and the preferred parent times out, the fib entry is not updated accordingly to point to the new preferred parent until a DIO is received.
This PR adds the new default route pointing to the next preferred parent as soon as the former one gets deleted.

Depends on #5135

@cgundogan cgundogan added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking GNRC labels Mar 22, 2016
@cgundogan cgundogan added this to the Release 2016.04 milestone Mar 22, 2016
@cgundogan cgundogan added the State: waiting for other PR State: The PR requires another PR to be merged first label Mar 22, 2016
@cgundogan cgundogan force-pushed the pr/gnrc_rpl/remove_parent_create_new_fib_entry branch from 19fb23b to eae0e4c Compare March 23, 2016 10:37
@cgundogan
Copy link
Member Author

rebased to current master and changed the approach of updating the fib

@cgundogan cgundogan removed the State: waiting for other PR State: The PR requires another PR to be merged first label Mar 23, 2016
@cgundogan
Copy link
Member Author

how to test?
When a node has two parents, let the preferred one (the one appearing first at rpl output) time out by rebooting/killing it. When the node times out, (on master) the node will not enter a new default entry in the fib until a DIO is received.

sizeof(ipv6_addr_t),
FIB_FLAG_RPL_ROUTE,
(parent->next->lifetime - now) * SEC_IN_MS);
}
Copy link
Member

Choose a reason for hiding this comment

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

else we keep the old one?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, for the case that this parent (to delete) is not the preferred parent, the fib default entry is not removed and should still point to the preferred parent

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, looked at the wrong if:

if there is no parent->next then we basically have no parents left, so we cannot add a new fib entry

Copy link
Member

Choose a reason for hiding this comment

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

but we could remove the removed parent from the FIB

Copy link
Member Author

Choose a reason for hiding this comment

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

That's done in line 200 if I understand you correctly

Copy link
Member

Choose a reason for hiding this comment

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

ahh sry 👓

@BytesGalore
Copy link
Member

Taking the next parent from the parent set seems a correct approach to me, and the RFC6550 doesn't give a detailed procedure which parent should be chosen [1].
So ACK

[1] https://tools.ietf.org/html/rfc6550#section-8.2.2.7

@BytesGalore BytesGalore added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 23, 2016
@cgundogan
Copy link
Member Author

Murdock is happy - GO

@cgundogan cgundogan merged commit c0a8ce3 into RIOT-OS:master Mar 23, 2016
@cgundogan cgundogan deleted the pr/gnrc_rpl/remove_parent_create_new_fib_entry branch March 23, 2016 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking 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.

2 participants