Module Name:    src
Committed By:   snj
Date:           Thu Aug  8 21:58:55 UTC 2013

Modified Files:
        src/sys/netinet6 [netbsd-6]: nd6_rtr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #926):
        sys/netinet6/nd6_rtr.c: revision 1.86
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.


To generate a diff of this commit:
cvs rdiff -u -r1.82.4.2 -r1.82.4.3 src/sys/netinet6/nd6_rtr.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_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.82.4.2 src/sys/netinet6/nd6_rtr.c:1.82.4.3
--- src/sys/netinet6/nd6_rtr.c:1.82.4.2	Fri Jul 12 11:18:15 2013
+++ src/sys/netinet6/nd6_rtr.c	Thu Aug  8 21:58:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.82.4.2 2013/07/12 11:18:15 jdc Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.82.4.3 2013/08/08 21:58:55 snj Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.82.4.2 2013/07/12 11:18:15 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.82.4.3 2013/08/08 21:58:55 snj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1038,10 +1038,12 @@ prelist_remove(struct nd_prefix *pr)
 		free(pfr, M_IP6NDP);
 	}
 
-	ext->nprefixes--;
-	if (ext->nprefixes < 0) {
-		log(LOG_WARNING, "prelist_remove: negative count on %s\n",
-		    pr->ndpr_ifp->if_xname);
+	if (ext) {
+		ext->nprefixes--;
+		if (ext->nprefixes < 0) {
+			log(LOG_WARNING, "prelist_remove: negative count on "
+			    "%s\n", pr->ndpr_ifp->if_xname);
+		}
 	}
 	splx(s);
 

Reply via email to