mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 05:24:37 +08:00
ND6: Always set neighbor_cache.state together with counter value to avoid inconsistency
This commit is contained in:
parent
ec236da972
commit
bef7873042
@ -231,8 +231,6 @@ nd6_input(struct pbuf *p, struct netif *inp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Update cache entry. */
|
/* Update cache entry. */
|
||||||
neighbor_cache[i].netif = inp;
|
|
||||||
neighbor_cache[i].counter.reachable_time = reachable_time;
|
|
||||||
if ((na_hdr->flags & ND6_FLAG_OVERRIDE) ||
|
if ((na_hdr->flags & ND6_FLAG_OVERRIDE) ||
|
||||||
(neighbor_cache[i].state == ND6_INCOMPLETE)) {
|
(neighbor_cache[i].state == ND6_INCOMPLETE)) {
|
||||||
/* Check that link-layer address option also fits in packet. */
|
/* Check that link-layer address option also fits in packet. */
|
||||||
@ -256,7 +254,10 @@ nd6_input(struct pbuf *p, struct netif *inp)
|
|||||||
|
|
||||||
MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len);
|
MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
neighbor_cache[i].netif = inp;
|
||||||
neighbor_cache[i].state = ND6_REACHABLE;
|
neighbor_cache[i].state = ND6_REACHABLE;
|
||||||
|
neighbor_cache[i].counter.reachable_time = reachable_time;
|
||||||
|
|
||||||
/* Send queued packets, if any. */
|
/* Send queued packets, if any. */
|
||||||
if (neighbor_cache[i].q != NULL) {
|
if (neighbor_cache[i].q != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user