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: add netif_addr to DODAG #5136

Merged
merged 1 commit into from
Mar 23, 2016

Conversation

cgundogan
Copy link
Member

By storing the netif_addr in the DODAG we can omit values like the prefix_len, preferred_lifetime and valid_lifetime of the IPv6 address configured by RPL PIOs. No need to store the same information at several places.

Depends on #5135

@cgundogan cgundogan added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking GNRC labels Mar 22, 2016
@cgundogan cgundogan force-pushed the pr/gnrc_rpl/netif_addr branch from d680aa2 to 884663c Compare March 22, 2016 17:03
@cgundogan cgundogan added the State: waiting for other PR State: The PR requires another PR to be merged first label Mar 22, 2016
@BytesGalore
Copy link
Member

I'm not opposing, but when we use gnrc_ipv6_netif_addr_t and rely on the set ND members, RPL cannot be used without ND.
So we have to be sure if this is what we want.

@cgundogan
Copy link
Member Author

Hmm, I don't see the connection to ND here. There exists a gnrc_ipv6_netif_addr_t element for each ipv6 address that is registered at the interface.

@cgundogan cgundogan force-pushed the pr/gnrc_rpl/netif_addr branch from 884663c to b280984 Compare March 23, 2016 09:38
@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

rebased

@BytesGalore
Copy link
Member

I mean prefix_info->valid_lifetime = dodag->netif_addr->valid; [1]. netif_addr->valid must have been set "somewhere" and I think its in ND

[1] 884663c#diff-7688fe4f626e93c827c7d5b563b80aa5R143

@cgundogan
Copy link
Member Author

I am not sure whether the valid lifetime is set through ND, but it is propagated in PIO which is used in ND, but also in RPL. So there is a common interest in these values even for RPL without ND

@cgundogan
Copy link
Member Author

AFAIU, the preferred and valid lifetime should be set when the ipv6 address is added to the interface. So this may set an administrator or whoever adds that ip address to the interface. RPL is just readeing those values and puts them into the PIO.

@cgundogan
Copy link
Member Author

AFAIU, the preferred and valid lifetime should be set when the ipv6 address is added to the interface.

Although, I think we currently do not support this and the lifetimes are infinite (:

@cgundogan
Copy link
Member Author

there is however one problem that we also have without this PR: If someone deletes the ipv6 address that is used for this DODAG (and with this PR, the same is true for the according gnrc_ipv6_netif_t struct), then we will have undefined behaviour. This is unrelated to this PR, but needs to be addressed soon.

@BytesGalore
Copy link
Member

Ok, looks good codewise 👍

@BytesGalore
Copy link
Member

we should open an issue for it

@BytesGalore
Copy link
Member

works as expected so ACK

@BytesGalore
Copy link
Member

then we will have undefined behaviour.

I guess then we will get a nullpointer exception and/or corrupt the memory of others

@cgundogan cgundogan 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
@miri64 miri64 merged commit 9a60fb3 into RIOT-OS:master Mar 23, 2016
@cgundogan cgundogan added this to the Release 2016.04 milestone Mar 23, 2016
@cgundogan cgundogan deleted the pr/gnrc_rpl/netif_addr branch March 23, 2016 14:28
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: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants