diff options
author | vangyzen <vangyzen@FreeBSD.org> | 2018-02-05 18:56:34 +0000 |
---|---|---|
committer | vangyzen <vangyzen@FreeBSD.org> | 2018-02-05 18:56:34 +0000 |
commit | 98e3b0400397c25820933045a37bf64f30bb2935 (patch) | |
tree | dd3885194b09a4c1643bbb0b8b46149fadba1392 | |
parent | 5650e69d1e29b104583820a083e47153f77476eb (diff) | |
download | FreeBSD-src-98e3b0400397c25820933045a37bf64f30bb2935.zip FreeBSD-src-98e3b0400397c25820933045a37bf64f30bb2935.tar.gz |
MFC r328552
ND6: Set the correct state for new neighbor cache entries
Restore state 6. Many of the UNH tests end up exercising this
state, where we have a new neighbor cache entry and a new link-layer
entry is being created for it. The link-layer address is currently
unknown so the initial state of the "llentry" should remain initialized
to ND6_LLINFO_NOSTATE so that the ND code will send a solicitation.
Setting this to ND6_LLINFO_STALE implies that the link-level entry
is valid and can be used (but needs to be refreshed via the Neighbor
Unreachability state machine).
https://forums.freebsd.org/threads/64287/
Submitted by: Farrell Woods <Farrell_Woods@Dell.com>
Reviewed by: mjoras, dab, ae
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D14059
-rw-r--r-- | sys/netinet6/nd6.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index d7a8760..aba2d57 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -2030,10 +2030,11 @@ nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr, if (ln_tmp == NULL) { /* No existing lle, mark as new entry (6,7) */ is_newentry = 1; - nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); - if (lladdr != NULL) /* (7) */ + if (lladdr != NULL) { /* (7) */ + nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); + } } else { lltable_free_entry(LLTABLE6(ifp), ln); ln = ln_tmp; |