gnrc_ipv6_nib: don't auto-configure IPv6 w/o SLAAC on non-6LN interface [backport 2019.10]#12522
Merged
cgundogan merged 1 commit intoRIOT-OS:2019.10-branchfrom Oct 21, 2019
Conversation
When the NIB is compiled for 6LN mode (but not a 6LBR), the Stateless Address Autoconfiguration (SLAAC) functionality is disabled, as it is typically not required; see `sys/include/net/gnrc/ipv6/nib/conf.h`, ll. 46 and 55. However, if a non-6LN interface is also compiled in (still without making the node a border router) an auto-configured address will be assigned in accordance with [RFC 6775] to the interface, just assuming the interface is a 6LN interface. As it then only performs duplicate address detection RFC-6775-style then, the address then never becomes valid, as the duplicate address detection according to [RFC 4862] (part of the SLAAC functionality) is never performed. As auto-configuring an address without SLAAC doesn't make sense, this fix makes the interface skip it completely, but provides a warning to the user, so they know what to do. [RFC 6775]: https://tools.ietf.org/html/rfc6775#section-5.2 [RFC 4862]: https://tools.ietf.org/html/rfc4862#section-5.4 (cherry picked from commit 7cba2fb)
5 tasks
80 tasks
miri64
added a commit
to RIOT-OS/Release-Specs
that referenced
this pull request
Oct 24, 2019
Addresses the upstream fix in RIOT-OS/RIOT#12522
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.
Backport of #12513
Contribution description
When the NIB is compiled for 6LN mode (but not a 6LBR), the Stateless Address Autoconfiguration (SLAAC) functionality is disabled, as it is typically not required; see
RIOT/sys/include/net/gnrc/ipv6/nib/conf.h
Lines 41 to 48 in d9c240a
RIOT/sys/include/net/gnrc/ipv6/nib/conf.h
Lines 50 to 59 in d9c240a
However, if a non-6LN interface is also compiled in (still without making the node a border router) an auto-configured address will be assigned in accordance with RFC 6775 to the interface, just assuming the interface is a 6LN interface. As it then only performs duplicate address detection RFC-6775-style then, the address then never becomes valid, as the duplicate address detection according to RFC 4862 (part of the SLAAC functionality) is never performed.
As auto-configuring an address without SLAAC doesn't make sense, this fix makes the interface skip it completely, but provides a warning to the user, so they know what to do.
Testing procedure
Compile
examples/gnrc_networkingnativewith both anetdev_tapandsocket_zep:GNRC_NETIF_NUMOF=2 USEMODULE=socket_zep TERMFLAGS="-z [::]:17755 tap0" \ make -C examples/gnrc_networking all termWith this fix, the link-local address of the Ethernet interface won't receive an auto-configured link-local address and a warning is printed
Compiling with
CFLAGS+=-DGNRC_IPV6_NIB_CONF_SLAAC=1still auto-configures the address and validates it shortly after the node started (and the warning is not shown ;-)):Without the fix and CFLAGS=-DGNRC_IPV6_NIB_CONF_SLAAC=1 not set the Ethernet interface gets a link-local address which will stay tentative forever:
Issues/PRs references
Several, but triggered by testing procedures in #12512 and #10499.