diff options
author | qingli <qingli@FreeBSD.org> | 2008-12-22 07:11:15 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2008-12-22 07:11:15 +0000 |
commit | 8f88fc89cbc9435c5588b14d879e730df10dc156 (patch) | |
tree | a46d769e389bc356f911f137ebde381100c96c5b /sys/netinet6 | |
parent | e3cd29b301e6fca9d070995095d27115813dd149 (diff) | |
download | FreeBSD-src-8f88fc89cbc9435c5588b14d879e730df10dc156.zip FreeBSD-src-8f88fc89cbc9435c5588b14d879e730df10dc156.tar.gz |
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.
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 6ba852c..ee06199 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2204,12 +2204,14 @@ in6_lltable_lookup(struct lltable *llt, u_int flags, 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)) { |