Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Make sure that prefixes get purged. This fixes ...
details: https://anonhg.NetBSD.org/src/rev/171bba10329c
branches: trunk
changeset: 579961:171bba10329c
user: tron <tron%NetBSD.org@localhost>
date: Sun Apr 03 11:02:27 2005 +0000
description:
Make sure that prefixes get purged. This fixes PR kern/21189,
PR kern/25968 and PR kern/27873.
diffstat:
sys/netinet6/nd6.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r d60ed807b09b -r 171bba10329c sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Sun Apr 03 10:56:59 2005 +0000
+++ b/sys/netinet6/nd6.c Sun Apr 03 11:02:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.91 2004/12/04 16:10:25 peter Exp $ */
+/* $NetBSD: nd6.c,v 1.92 2005/04/03 11:02:27 tron Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.91 2004/12/04 16:10:25 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.92 2005/04/03 11:02:27 tron Exp $");
#include "opt_ipsec.h"
@@ -637,6 +637,13 @@
npr = pr->ndpr_next;
if (pr->ndpr_ifp == ifp) {
/*
+ * Because if_detach() does *not* release prefixes
+ * while purging addresses the reference count will
+ * still be above zero. We therefore reset it to
+ * make sure that the prefix really gets purged.
+ */
+ pr->ndpr_refcnt = 0;
+ /*
* Previously, pr->ndpr_addr is removed as well,
* but I strongly believe we don't have to do it.
* nd6_purge() is only called from in6_ifdetach(),
Home |
Main Index |
Thread Index |
Old Index