Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Feb 2018 18:56:34 +0000 (UTC)
From:      Eric van Gyzen <vangyzen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r328897 - stable/11/sys/netinet6
Message-ID:  <201802051856.w15IuYNt009576@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vangyzen
Date: Mon Feb  5 18:56:34 2018
New Revision: 328897
URL: https://svnweb.freebsd.org/changeset/base/328897

Log:
  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

Modified:
  stable/11/sys/netinet6/nd6.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet6/nd6.c
==============================================================================
--- stable/11/sys/netinet6/nd6.c	Mon Feb  5 18:48:00 2018	(r328896)
+++ stable/11/sys/netinet6/nd6.c	Mon Feb  5 18:56:34 2018	(r328897)
@@ -2030,10 +2030,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?201802051856.w15IuYNt009576>