slaac: add initial stateless address autoconfiguration (SLAAC) implementation #1039
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.
This PR adds
Cidr
and a LL addressInterface
This works by having a separate module to track the slaac state machine. The Interface module passes the received router advertisements to this module and polls this to query whether router solicitations must be send and whether the addresses and routes on the interface need to be synced with the slaac state.
Compared to the dhcpv4, this module modifies the address and route state on the
Interface
within the module itself without any outside glue or socket required.Currently there's no separate feature for slaac and it is pulled in when
proto-ipv6
together withmedium-ieee802154
ormedium-ethernet
is enabled. Done this way because I consider SLAAC to be an essential part of IPv6. However, I'm not opposed to adding a separate feature for slaac that depends onproto-ipv6
An example is provided that prints the addresses and routes on the interface every second for testing with router advertisement daemons such as radvd
Example output
Alternative to #948
I can split out the initial commits of this PR into separate PRs if needed to ease reviewing.