Subject: bin/33418: /usr/sbin/rtadvd default maxinterval is wrong
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <ykomatsu@akaumigame.org>
List: netbsd-bugs
Date: 05/03/2006 14:10:00
>Number:         33418
>Category:       bin
>Synopsis:       /usr/sbin/rtadvd default maxinterval is wrong
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 03 14:10:00 +0000 2006
>Originator:     Yoshito Komatsu
>Release:        NetBSD 3.99.18
>Organization:
>Environment:
System: NetBSD c8.ln.akaumigame.org 3.99.18 NetBSD 3.99.18 (XENU) #0: Sun Apr 30 20:36:24 JST 2006 root@c8.ln.akaumigame.org:/usr/obj/sys/arch/i386/compile/XENU i386
Architecture: i386
Machine: i386
>Description:
	When I run "/etc/rc.d/rtadvd start" without /etc/rtadvd.conf,
	an error message appears in /var/log/messages:

	<getconfig> maxinterval (0) on bge0 is invalid (must be between 4 and 1800)

	/usr/sbin/rtadvd should work correctly without /etc/rtadvd.conf.
>How-To-Repeat:
	Please run the following command without /etc/rtadvd.conf:

	# /etc/rc.d/rtadvd start
>Fix:
	usr.sbin/rtadvd/config.c is changed to set maxinterval 0
	as default.
	I think that the following patch solves this problem.

	--- usr.sbin/rtadvd/config.c.orig	2006-05-03 22:32:47.000000000 +0900
	+++ usr.sbin/rtadvd/config.c	2006-05-03 22:33:23.000000000 +0900
	@@ -155,7 +155,7 @@
		/*
		 * set router configuration variables.
		 */
	-	MAYHAVE(val, "maxinterval", tmp->maxinterval * 3);
	+	MAYHAVE(val, "maxinterval", DEF_MAXRTRADVINTERVAL);
		if (val < MIN_MAXINTERVAL || val > MAX_MAXINTERVAL) {
			syslog(LOG_ERR,
			       "<%s> maxinterval (%ld) on %s is invalid "