NetBSD Problem Report #51994

From www@NetBSD.org  Thu Feb 23 02:21:01 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3AE147A26E
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 23 Feb 2017 02:21:01 +0000 (UTC)
Message-Id: <20170223022059.B982C7A291@mollari.NetBSD.org>
Date: Thu, 23 Feb 2017 02:20:59 +0000 (UTC)
From: ozaki-r@netbsd.org
Reply-To: ozaki-r@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: rtadvd: fix the default value of rltime
X-Send-Pr-Version: www-1.0

>Number:         51994
>Category:       bin
>Synopsis:       rtadvd: fix the default value of rltime
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 23 02:25:00 +0000 2017
>Closed-Date:    Fri Jul 14 06:58:12 +0000 2017
>Last-Modified:  Fri Jul 14 06:58:12 +0000 2017
>Originator:     Ryota Ozaki
>Release:        6, 7, current
>Organization:
>Environment:
NetBSD bpv4 7.99.60 NetBSD 7.99.60 (BPV4_NFS) #11: Wed Feb 22 11:51:06 JST 2017  ozaki-r@rangeley:(hidden) amd64
>Description:
According to rtadvd.conf(5), the default value of rltime is 1800 seconds.
However the default value is set as maxinterval * 3.

The default value of maxinterval is 600, so if maxinterval isn't set, rltime
becomes 1800 correctly just in luck. However if maxinterval is set to
a some value other than 600, the default value of rltime wouldn't be 1800.
>How-To-Repeat:
Run rtadvd with setting maxinterval to a some value other than 600.
See the router lifetime field of a RA sent from the rtadvd (e.g., by tcpdump -vvv).
>Fix:
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index 5ef9e0c..5e39ac8 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -305,7 +305,7 @@ getconfig(const char *intface, int exithard)
                goto errexit;
        }

-       MAYHAVE(val, "rltime", tmp->maxinterval * 3);
+       MAYHAVE(val, "rltime", DEF_ADVROUTERLIFETIME);
        if (val && (val < tmp->maxinterval || val > MAXROUTERLIFETIME)) {
                syslog(LOG_ERR,
                       "<%s> router lifetime (%d) on %s is invalid "
diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h
index ad6fe86..21dbe49 100644
--- a/usr.sbin/rtadvd/rtadvd.h
+++ b/usr.sbin/rtadvd/rtadvd.h
@@ -52,6 +52,7 @@ extern struct sockaddr_in6 sin6_sitelocal_allrouters;
 #define DEF_ADVCURHOPLIMIT 64
 #define DEF_ADVVALIDLIFETIME 2592000
 #define DEF_ADVPREFERREDLIFETIME 604800
+#define DEF_ADVROUTERLIFETIME 1800

 #define MAXROUTERLIFETIME 9000
 #define MIN_MAXINTERVAL 4

>Release-Note:

>Audit-Trail:
From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51994 CVS commit: src/usr.sbin/rtadvd
Date: Mon, 27 Feb 2017 05:41:37 +0000

 Module Name:	src
 Committed By:	ozaki-r
 Date:		Mon Feb 27 05:41:37 UTC 2017

 Modified Files:
 	src/usr.sbin/rtadvd: config.c rtadvd.h

 Log Message:
 Fix the default value of rltime

 According to rtadvd.conf(5), the default value of rltime is 1800 seconds.

 PR bin/51994


 To generate a diff of this commit:
 cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/rtadvd/config.c
 cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/rtadvd/rtadvd.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->pending-pullups
State-Changed-By: ozaki-r@NetBSD.org
State-Changed-When: Wed, 01 Mar 2017 03:11:08 +0000
State-Changed-Why:
pullup-7 #1373 and pullup-6 #1440


From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51994 CVS commit: [netbsd-7] src/usr.sbin/rtadvd
Date: Fri, 12 May 2017 05:05:17 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri May 12 05:05:17 UTC 2017

 Modified Files:
 	src/usr.sbin/rtadvd [netbsd-7]: config.c rtadvd.h

 Log Message:
 Pull up following revision(s) (requested by ozaki-r in ticket #1373):
 	usr.sbin/rtadvd/config.c: revision 1.36
 	usr.sbin/rtadvd/rtadvd.h: revision 1.15
 Fix the default value of rltime
 According to rtadvd.conf(5), the default value of rltime is 1800 seconds.
 PR bin/51994


 To generate a diff of this commit:
 cvs rdiff -u -r1.33 -r1.33.8.1 src/usr.sbin/rtadvd/config.c
 cvs rdiff -u -r1.13 -r1.13.6.1 src/usr.sbin/rtadvd/rtadvd.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51994 CVS commit: [netbsd-7-1] src/usr.sbin/rtadvd
Date: Fri, 12 May 2017 05:08:00 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri May 12 05:08:00 UTC 2017

 Modified Files:
 	src/usr.sbin/rtadvd [netbsd-7-1]: config.c rtadvd.h

 Log Message:
 Pull up following revision(s) (requested by ozaki-r in ticket #1373):
 	usr.sbin/rtadvd/config.c: revision 1.36
 	usr.sbin/rtadvd/rtadvd.h: revision 1.15
 Fix the default value of rltime
 According to rtadvd.conf(5), the default value of rltime is 1800 seconds.
 PR bin/51994


 To generate a diff of this commit:
 cvs rdiff -u -r1.33 -r1.33.14.1 src/usr.sbin/rtadvd/config.c
 cvs rdiff -u -r1.13 -r1.13.12.1 src/usr.sbin/rtadvd/rtadvd.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51994 CVS commit: [netbsd-7-0] src/usr.sbin/rtadvd
Date: Fri, 12 May 2017 05:09:47 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri May 12 05:09:47 UTC 2017

 Modified Files:
 	src/usr.sbin/rtadvd [netbsd-7-0]: config.c rtadvd.h

 Log Message:
 Pull up following revision(s) (requested by ozaki-r in ticket #1373):
 	usr.sbin/rtadvd/config.c: revision 1.36
 	usr.sbin/rtadvd/rtadvd.h: revision 1.15
 Fix the default value of rltime
 According to rtadvd.conf(5), the default value of rltime is 1800 seconds.
 PR bin/51994


 To generate a diff of this commit:
 cvs rdiff -u -r1.33 -r1.33.10.1 src/usr.sbin/rtadvd/config.c
 cvs rdiff -u -r1.13 -r1.13.8.1 src/usr.sbin/rtadvd/rtadvd.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51994 CVS commit: [netbsd-6] src/usr.sbin/rtadvd
Date: Fri, 14 Jul 2017 06:19:58 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri Jul 14 06:19:58 UTC 2017

 Modified Files:
 	src/usr.sbin/rtadvd [netbsd-6]: config.c rtadvd.h

 Log Message:
 Pull up following revision(s) (requested by ozaki-r in ticket #1440):
 	usr.sbin/rtadvd/rtadvd.h: revision 1.15
 	usr.sbin/rtadvd/config.c: revision 1.36
 Fix the default value of rltime
 According to rtadvd.conf(5), the default value of rltime is 1800 seconds.
 PR bin/51994


 To generate a diff of this commit:
 cvs rdiff -u -r1.27.2.1 -r1.27.2.2 src/usr.sbin/rtadvd/config.c
 cvs rdiff -u -r1.11 -r1.11.2.1 src/usr.sbin/rtadvd/rtadvd.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51994 CVS commit: [netbsd-6-1] src/usr.sbin/rtadvd
Date: Fri, 14 Jul 2017 06:24:16 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri Jul 14 06:24:16 UTC 2017

 Modified Files:
 	src/usr.sbin/rtadvd [netbsd-6-1]: config.c rtadvd.h

 Log Message:
 Pull up following revision(s) (requested by ozaki-r in ticket #1440):
 	usr.sbin/rtadvd/rtadvd.h: revision 1.15
 	usr.sbin/rtadvd/config.c: revision 1.36
 Fix the default value of rltime
 According to rtadvd.conf(5), the default value of rltime is 1800 seconds.
 PR bin/51994


 To generate a diff of this commit:
 cvs rdiff -u -r1.27.2.1 -r1.27.2.1.6.1 src/usr.sbin/rtadvd/config.c
 cvs rdiff -u -r1.11 -r1.11.10.1 src/usr.sbin/rtadvd/rtadvd.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51994 CVS commit: [netbsd-6-0] src/usr.sbin/rtadvd
Date: Fri, 14 Jul 2017 06:28:01 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri Jul 14 06:28:01 UTC 2017

 Modified Files:
 	src/usr.sbin/rtadvd [netbsd-6-0]: config.c rtadvd.h

 Log Message:
 Pull up following revision(s) (requested by ozaki-r in ticket #1440):
 	usr.sbin/rtadvd/rtadvd.h: revision 1.15
 	usr.sbin/rtadvd/config.c: revision 1.36
 Fix the default value of rltime
 According to rtadvd.conf(5), the default value of rltime is 1800 seconds.
 PR bin/51994


 To generate a diff of this commit:
 cvs rdiff -u -r1.27.2.1 -r1.27.2.1.4.1 src/usr.sbin/rtadvd/config.c
 cvs rdiff -u -r1.11 -r1.11.8.1 src/usr.sbin/rtadvd/rtadvd.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: ozaki-r@NetBSD.org
State-Changed-When: Fri, 14 Jul 2017 06:58:12 +0000
State-Changed-Why:
pullup done


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.