Date: Mon, 29 Jan 2018 16:12:26 +0000 (UTC) From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328552 - head/sys/netinet6 Message-ID: <201801291612.w0TGCQ7A037520@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vangyzen Date: Mon Jan 29 16:12:26 2018 New Revision: 328552 URL: https://svnweb.freebsd.org/changeset/base/328552 Log: 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 MFC after: 1 week Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D14059 Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Jan 29 14:23:44 2018 (r328551) +++ head/sys/netinet6/nd6.c Mon Jan 29 16:12:26 2018 (r328552) @@ -2032,10 +2032,11 @@ nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *f 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801291612.w0TGCQ7A037520>