[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_nib/arsm: ensure proper int width in backoff calculation [backport 2019.01] (#11007)

Martine Lenders notifications at github.com
Tue Feb 12 17:56:50 CET 2019


# Backport of #10369

<!--
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
Otherwise, the result might flow over on 8/16-bit platforms

### Testing procedure
I'm not sure the address resolution state machine fits on any of our 8/16-bit platforms... But otherwise: 

* flash an application with `gnrc_ipv6_default` an `GNRC_IPV6_NIB_CONF_ARSM == 1` to two 8- or 16-bit boards with networking capabilities
* let them find via neighbor discovery (e.g. by pinging one from the other)
* let the neighbor information go STALE (check with `nib neigh`)
* let one of the nodes become unreachable (e.g. by turning it off)
* try to update stale neighbor information (e.g. by pinging again)
* let the neighbor information go to UNREACHABLE (check with `nib neigh`)
* see (e.g. with wireshark) that the neighbor solicitations go out ad infinitum but with an truncated (at `NDP_MAX_RETRANS_TIMER_MS` == 1min) exponential (base 2) backoff between them.
* run `unittests` with `tests-gnrc_ipv6_nib` on various platforms.

### Issues/PRs references
Pointed out in https://github.com/RIOT-OS/RIOT/pull/10350#discussion_r231905390

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

  https://github.com/RIOT-OS/RIOT/pull/11007

-- Commit Summary --

  * gnrc_ipv6_nib/arsm: ensure proper int width in backoff calculation
  * gnrc_ipv6_nib: expose non-randomized part of NS-backoff calculation
  * tests/unittests: add tests for exponential NS backoff

-- File Changes --

    M sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c (15)
    M sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.h (37)
    M tests/unittests/tests-gnrc_ipv6_nib/tests-gnrc_ipv6_nib-internal.c (54)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11007.patch
https://github.com/RIOT-OS/RIOT/pull/11007.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11007
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190212/d21e8e66/attachment.html>


More information about the notifications mailing list