Module Name:    src
Committed By:   ozaki-r
Date:           Tue Jun 30 06:42:06 UTC 2015

Modified Files:
        src/sys/netinet6: nd6_rtr.c

Log Message:
Fix nd6_numroutes counting

nd6_numroutes is intended to be incremented when a route is added via RA
and decremented when a RA route is deleted. However, a decrement of a RA
route was skipped when there remained references to the RA route.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 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.99 src/sys/netinet6/nd6_rtr.c:1.100
--- src/sys/netinet6/nd6_rtr.c:1.99	Sat May  2 14:28:30 2015
+++ src/sys/netinet6/nd6_rtr.c	Tue Jun 30 06:42:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.99 2015/05/02 14:28:30 roy Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.100 2015/06/30 06:42:06 ozaki-r 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.99 2015/05/02 14:28:30 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.100 2015/06/30 06:42:06 ozaki-r Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -568,8 +568,8 @@ defrouter_delreq(struct nd_defrouter *dr
 			 */
 			oldrt->rt_refcnt++;
 			rtfree(oldrt);
-			nd6_numroutes--;
 		}
+		nd6_numroutes--;
 	}
 
 	dr->installed = 0;

Reply via email to