Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2008 07:11:15 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186392 - head/sys/netinet6
Message-ID:  <200812220711.mBM7BFCq054404@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Mon Dec 22 07:11:15 2008
New Revision: 186392
URL: http://svn.freebsd.org/changeset/base/186392

Log:
  Similar to the INET case, do not destroy the nd6 entries for
  interface addresses until those addresses are removed. I already
  made the patch in INET but forgot to bring the code over for
  INET6.

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c	Mon Dec 22 01:56:56 2008	(r186391)
+++ head/sys/netinet6/in6.c	Mon Dec 22 07:11:15 2008	(r186392)
@@ -2204,12 +2204,14 @@ in6_lltable_lookup(struct lltable *llt, 
 		lle->lle_head = lleh;
 		LIST_INSERT_HEAD(lleh, lle, lle_next);
 	} else if (flags & LLE_DELETE) {
-		LLE_WLOCK(lle);
-		lle->la_flags = LLE_DELETED;
-		LLE_WUNLOCK(lle);
+		if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) {
+			LLE_WLOCK(lle);
+			lle->la_flags = LLE_DELETED;
+			LLE_WUNLOCK(lle);
 #ifdef DIAGNOSTICS
-		log(LOG_INFO, "ifaddr cache = %p  is deleted\n", lle);	
+			log(LOG_INFO, "ifaddr cache = %p  is deleted\n", lle);	
 #endif	
+		}
 		lle = (void *)-1;
 	}
 	if (LLE_IS_VALID(lle)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812220711.mBM7BFCq054404>