Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2001 00:11:41 -0700 (PDT)
From:      Gregory Neil Shapiro <gshapiro+freebsd-gnats@gshapiro.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   conf/31366: rc.network6: Order of operations for ipv6_ifconfig_X_alias# wrong
Message-ID:  <200110190711.f9J7BfIe028306@horsey.gshapiro.net>

next in thread | raw e-mail | index | archive | help

>Number:         31366
>Category:       conf
>Synopsis:       rc.network6: Order of operations for ipv6_ifconfig_X_alias# wrong
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 19 00:20:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Gregory Neil Shapiro
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD horsey.gshapiro.net 4.4-STABLE FreeBSD 4.4-STABLE #13: Sun Oct 7 17:12:57 PDT 2001 gshapiro@horsey.gshapiro.net:/home/FreeBSD/RELENG_4/obj/sys/HORSEY i386

>Description:

In order to use IPv6 autoconfiguration (i.e., rtsol) as well as additional
IPv6 addresses for an interface (for virtual hosting), I put the following
in /etc/rc.conf:

ipv6_enable="YES"
ipv6_ifconfig_fxp0_alias0="3ffe:0507:018b:0001:d1dc:f7bc:0000:0001"

Since there is no "ipv6_ifconfig_fxp0" setting, the interface will be
autoconfigured.  However, /etc/rc.network6 (in network6_interface_setup())
adds alias entries before calling rtsol.  rtsol doesn't autoconfigure
the the interface address if it already has one.

>How-To-Repeat:

>Fix:

I believe the rtsol must be done before the alias processing.  I've tested
this in my setup and it works.

Index: etc/rc.network6
===================================================================
RCS file: /src/FreeBSD/cvsrepo/src/etc/rc.network6,v
retrieving revision 1.5.2.18
diff -u -r1.5.2.18 rc.network6
--- etc/rc.network6	2001/07/27 20:37:53	1.5.2.18
+++ etc/rc.network6	2001/10/19 07:04:46
@@ -289,15 +289,6 @@
 			rtsol_interface=no
 			ifconfig $i inet6 ${ipv6_ifconfig} alias
 		fi
-		alias=0
-		while : ; do
-			eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias}
-			if [ -z "${ipv6_ifconfig}" ]; then
-				break;
-			fi
-			ifconfig $i inet6 ${ipv6_ifconfig} alias
-			alias=$((${alias} + 1))
-		done
 
 		if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ]
 		then
@@ -323,6 +314,19 @@
 		ifconfig $1 up
 		rtsol $1
 	fi
+
+	for i in $interfaces; do
+		alias=0
+		while : ; do
+			eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias}
+			if [ -z "${ipv6_ifconfig}" ]; then
+				break;
+			fi
+			ifconfig $i inet6 ${ipv6_ifconfig} alias
+			alias=$((${alias} + 1))
+		done
+	done
+
 }
 
 network6_stf_setup() {
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110190711.f9J7BfIe028306>