[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_nib: add address from netif to address validation timer (#11716)

Martine Lenders notifications at github.com
Tue Jun 18 12:13:56 CEST 2019

The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.

### Contribution description
During [a demo](https://github.com/miri64/RIOT_playground/tree/30a37a76b57211b6253ab64139ee9eccf959c9c5/lndw18_luke) for LNdW in Berlin] last weekend, we faced the problem, that the nodes oftentimes registered with their link-local address to the resource directory. This was caused by a bug in the duplicate address detection, causing the global address never to become valid.

The `addr` parameter of the NIB's `_handle_dad()` can come from anywhere (e.g. in the fallback to classic SLAAC the destination address of the IP header is used),


so putting that pointer in a timer is not a good idea. Instead we use the version of
the address that is stored within the interface.
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes

### Testing procedure
Since it may happen that `addr` still contains the correct address (and only occurs when working with a Raspberry Pi), when the timer is fired, this is not easy to reproduce. But here is a try.

Make sure 4845265 is in your tested version!

Enable DEBUG in `sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c` and flash `gnrc_networking` to multiple 6LoWPAN-capable nodes (remember to set `-DGNRC_IPV6_NIB_CONF_SLAAC=1` in `CFLAGS`). Have a a Raspberry Pi with a 6LoWPAN-capable interface and reset all the nodes. Without the last change, some of the nodes will output garbage in the debug output. With it it will always be the global address.
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output

### Issues/PRs references
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * gnrc_ipv6_nib/SLAAC: add debug message for address validation
  * gnrc_ipv6_nib: add debug messages for DAD + 6Lo
  * gnrc_ipv6_nib: add address from netif to address validation timer

-- File Changes --

    M sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c (6)
    M sys/net/gnrc/network_layer/ipv6/nib/nib.c (3)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190618/083f2172/attachment.html>

More information about the notifications mailing list