Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rtadvd Fix a bug that incorrect RA packet is sent i...



details:   https://anonhg.NetBSD.org/src/rev/6712db29cc40
branches:  trunk
changeset: 780812:6712db29cc40
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Aug 08 04:05:26 2012 +0000

description:
Fix a bug that incorrect RA packet is sent if rtadvd.conf exists.
Fixes PR#46580 reported by Takahiro HAYASHI.

diffstat:

 usr.sbin/rtadvd/config.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 8b30b1d4d85b -r 6712db29cc40 usr.sbin/rtadvd/config.c
--- a/usr.sbin/rtadvd/config.c  Wed Aug 08 02:18:36 2012 +0000
+++ b/usr.sbin/rtadvd/config.c  Wed Aug 08 04:05:26 2012 +0000
@@ -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 @@
        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 @@
 
                /* link into chain */
                TAILQ_INSERT_TAIL(&rai->prefix, pp, next);
+               rai->pfxs++;
        }
 
        freeifaddrs(ifap);



Home | Main Index | Thread Index | Old Index