[riot-notifications] [RIOT] ng_ndp: fix neighbor advertisement handling (#3176)

Martine Lenders notifications at github.com
Tue Jun 9 18:26:46 CEST 2015


The setting of the states and reset of the retransmission timers is broken in the current implementation. This patch fixes that behavior and simplifies the code a little.

You can test, by using `tests/driver_netdev_eth` with `USEMODULE += ng_icmpv6_echo ng_ipv6_default` or just using `examples/ng_networking` from #2895.

Start-up 2 native nodes and ping one of them from the other. The pinging node should then send a neighbor solicitation to the solicited-nodes multicast address of the pinged node (`ff02::1:XXXX:XXXX` for IPv6 address `xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXXX:XXXX`) and the pinged node answers with a unicast neighbor advertisement. Then 3 pings are send and answered. If you check the neighbor cache on the pinged node now with `ncache` the state should be `DELAY`, since there were already packets send (the replies) to the pinging node (triggering the neighbor cache to switch from STALE to DELAY). After 5 seconds the neighbor cache entry switches to PROBE state and sends out 1 unicast neighbor solicitation to the pinging node, that is answered by the pinging node with a unicast neighbor advertisement. If the state after this on the pinged node is REACHABLE the test was successful. Previously the entry would have been stuck in PROBE state (which also triggered resending of further neighbor sol
 icitations).
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * ng_ndp: fix neighbor advertisement handling

-- File Changes --

    M sys/net/network_layer/ng_ndp/ng_ndp.c (219)

-- Patch Links --

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

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3176
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150609/dfb497be/attachment-0001.html>


More information about the notifications mailing list