Module Name: src
Committed By: msaitoh
Date: Wed Aug 8 04:05:26 UTC 2012
Modified Files:
src/usr.sbin/rtadvd: config.c
Log Message:
Fix a bug that incorrect RA packet is sent if rtadvd.conf exists.
Fixes PR#46580 reported by Takahiro HAYASHI.
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/rtadvd/config.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/rtadvd/config.c
diff -u src/usr.sbin/rtadvd/config.c:1.27 src/usr.sbin/rtadvd/config.c:1.28
--- src/usr.sbin/rtadvd/config.c:1.27 Sun Dec 11 20:44:44 2011
+++ src/usr.sbin/rtadvd/config.c Wed Aug 8 04:05:26 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: config.c,v 1.27 2011/12/11 20:44:44 christos Exp $ */
+/* $NetBSD: config.c,v 1.28 2012/08/08 04:05:26 msaitoh Exp $ */
/* $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $ */
/*
@@ -290,7 +290,7 @@ getconfig(const char *intface)
MAYHAVE(val, "clockskew", 0);
tmp->clockskew = val;
- tmp->pfxs++;
+ tmp->pfxs = 0;
TAILQ_INIT(&tmp->prefix);
for (i = -1; i < MAXPREFIX; i++) {
struct prefix *pfx;
@@ -763,6 +763,7 @@ get_prefix(struct rainfo *rai)
/* link into chain */
TAILQ_INSERT_TAIL(&rai->prefix, pp, next);
+ rai->pfxs++;
}
freeifaddrs(ifap);