Subject: misc/12814: no expected way to set a default route for v6 yet
To: None <gnats-bugs@gnats.netbsd.org>
From: S.P.Zeidler <spz@serpens.de>
List: netbsd-bugs
Date: 05/03/2001 10:00:06
>Number:         12814
>Category:       misc
>Synopsis:       no expected way to set a default route for v6 yet
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu May 03 01:00:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     S.P.Zeidler
>Release:        NetBSD 1.5
>Organization:
dis-
>Environment:
	
System: NetBSD serpens.de 1.5 NetBSD 1.5 (SERPENS) #0: Sun Dec 17 01:59:30 MET 2000 spz@serpens.de:/data/15src/sys/arch/amiga/compile/SERPENS amiga


>Description:
	In order to get rid of netstart.local I'd need a way to define the
	IPv6 default route for a non-autohost in another way. Unless I'm blind
	(and that would be nothing new :->) there isn't one yet.
>How-To-Repeat:
	
>Fix:
	I suggest putting in the following, defining an 'else' action for 'is
	rtsol defined?', keeping much with "what's already familiar":
--------- sniplet ---------
--- /etc/rc.d/network	Tue Oct 17 23:20:51 2000
+++ network	Thu May  3 09:47:31 2001
@@ -305,6 +305,16 @@
 			#
 			sleep $dadcount
 			sleep 1
+		else
+			# Check $defaultroute6, then /etc/mygate6, for the name of my 
+			# gateway host. That name must be in /etc/hosts.
+			#
+			if [ -z "$defaultroute6" -a -f /etc/mygate6 ]; then 
+				defaultroute6=`cat /etc/mygate6`
+			fi
+			if [ -n "$defaultroute6" ]; then
+				route add -inet6 default $defaultroute6
+			fi  
 		fi
 	fi
 
--------- sniplet ---------

	The necessary change to /etc/defaults/rc.conf is left as an exercise to
	the reader :-P :-]	
>Release-Note:
>Audit-Trail:
>Unformatted: