Module Name: src Committed By: martin Date: Fri Jul 26 11:27:36 UTC 2019
Modified Files: src/sys/netinet6 [netbsd-8]: nd6.c Log Message: Pull up following revision(s) (requested by christos in ticket #1307): sys/netinet6/nd6.c: revision 1.256 Decrease the reference count before freeing, so that the entries actually get free'd. (Ryota Ozaki) To generate a diff of this commit: cvs rdiff -u -r1.232.2.10 -r1.232.2.11 src/sys/netinet6/nd6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.232.2.10 src/sys/netinet6/nd6.c:1.232.2.11 --- src/sys/netinet6/nd6.c:1.232.2.10 Mon Jul 8 16:30:58 2019 +++ src/sys/netinet6/nd6.c Fri Jul 26 11:27:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.232.2.10 2019/07/08 16:30:58 martin Exp $ */ +/* $NetBSD: nd6.c,v 1.232.2.11 2019/07/26 11:27:36 martin 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.232.2.10 2019/07/08 16:30:58 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.232.2.11 2019/07/26 11:27:36 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -498,6 +498,7 @@ nd6_llinfo_timer(void *arg) ln->ln_hold = m0; clear_llinfo_pqueue(ln); } + LLE_REMREF(ln); nd6_free(ln, 0); ln = NULL; if (m != NULL) { @@ -517,6 +518,7 @@ nd6_llinfo_timer(void *arg) case ND6_LLINFO_STALE: /* Garbage Collection(RFC 2461 5.3) */ if (!ND6_LLINFO_PERMANENT(ln)) { + LLE_REMREF(ln); nd6_free(ln, 1); ln = NULL; } @@ -540,6 +542,7 @@ nd6_llinfo_timer(void *arg) daddr6 = &ln->r_l3addr.addr6; send_ns = true; } else { + LLE_REMREF(ln); nd6_free(ln, 0); ln = NULL; }