From owner-freebsd-bugs Fri Oct 19 0:20: 9 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 886BC37B403 for ; Fri, 19 Oct 2001 00:20:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9J7K0R00314; Fri, 19 Oct 2001 00:20:00 -0700 (PDT) (envelope-from gnats) Received: from horsey.gshapiro.net (horsey.gshapiro.net [209.220.147.178]) by hub.freebsd.org (Postfix) with ESMTP id 807C237B401 for ; Fri, 19 Oct 2001 00:11:42 -0700 (PDT) Received: from horsey.gshapiro.net (gshapiro@localhost [IPv6:::1]) by horsey.gshapiro.net (8.12.1/8.12.1) with ESMTP id f9J7BfNM028307 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 19 Oct 2001 00:11:41 -0700 (PDT) Received: (from gshapiro@localhost) by horsey.gshapiro.net (8.12.1/8.12.1/Submit) id f9J7BfIe028306; Fri, 19 Oct 2001 00:11:41 -0700 (PDT) Message-Id: <200110190711.f9J7BfIe028306@horsey.gshapiro.net> Date: Fri, 19 Oct 2001 00:11:41 -0700 (PDT) From: Gregory Neil Shapiro To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: conf/31366: rc.network6: Order of operations for ipv6_ifconfig_X_alias# wrong Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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