Tue 11 Oct 2016 10:23:44 AM UTC, original submission:
From lwIP mailing list, Arpit Agarwal
-------------------------------------
Hi Ivan,
I am testing Core Protocols Only.
For e.g. Core Protocols Section 1: (spec.p2) : In my test many of the test cases are failing due to improper neighbor cache cleanup. If I am not wrong, the reason might be non-handling of one of the transition of nd6 state machine (refer link: https://njetwork.files.wordpress.com/2014/01/msi_ipv6-nd-state-machine1.png). I am unable to find the State change from Reachable to Stale on receiving NA with LLADDR change anywhere in the nd6 code.
Similary as per RFC 4861 , DAD-NA might not contain lladdr_opt, but the stack in lwip seems to drop NA if there is not lladdr_opt.
Refer Below code from nd6.c:
/* Unsolicited NA?*/
if (ip6_addr_ismulticast(ip6_current_dest_addr())) {
/* This is an unsolicited NA.
* link-layer changed?
* part of DAD mechanism? */
/* Check that link-layer address option also fits in packet. */
if (p->len < (sizeof(struct na_header) + 2)) {
/* @todo debug message */
pbuf_free(p);
ND6_STATS_INC(nd6.lenerr);
ND6_STATS_INC(nd6.drop);
return;
}
lladdr_opt = (struct lladdr_option )((u8_t)p->payload + sizeof(struct na_header));
if (p->len < (sizeof(struct na_header) + (lladdr_opt->length << 3))) {
/* @todo debug message */
pbuf_free(p);
ND6_STATS_INC(nd6.lenerr);
ND6_STATS_INC(nd6.drop);
return;
}
|