From owner-freebsd-bugs Sun Jan 7 12:10:20 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 3163537B404 for ; Sun, 7 Jan 2001 12:10:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f07KA2X02095; Sun, 7 Jan 2001 12:10:02 -0800 (PST) (envelope-from gnats) Received: from ussenterprise.ufp.org (unknown [209.249.106.101]) by hub.freebsd.org (Postfix) with ESMTP id E43FE37B400 for ; Sun, 7 Jan 2001 12:09:12 -0800 (PST) Received: (from root@localhost) by ussenterprise.ufp.org (8.11.1/8.11.1) id f07K9AB01844; Sun, 7 Jan 2001 15:09:10 -0500 (EST) (envelope-from bicknell) Message-Id: <200101072009.f07K9AB01844@ussenterprise.ufp.org> Date: Sun, 7 Jan 2001 15:09:10 -0500 (EST) From: bicknell@ufp.org Reply-To: bicknell@ufp.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: conf/24130: rc.network6 assumes single ipv6 interface is always the first interface Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 24130 >Category: conf >Synopsis: rc.network6 assumes single ipv6 interface is always the first interface >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 07 12:10:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Leo Bicknell >Release: FreeBSD 4.2-RELEASE i386 >Organization: United Federation of Planets >Environment: FreeBSD 4.2 compiled with IPv6 support. >Description: IPv6 end hosts are only allowed to autoconfigure a single interface, as autoconfiguring multiple interfaces may result in network reachability issues. This is correctly documented in /etc/rc.network6. However, the code in /etc/rc.network6 assumes that an autoconfiguring host _has only one NIC_, which is not a correct assumption. In my enviornment, the IPv6 network is separate from the IPv4 network. As such the machine has two NIC's, one for IPv4 _only_, and one for IPv6 _only_. The IPv6 NIC is the second NIC in the box (fxp1). This does not violate the rule of having a single NIC for IPv6 autoconfiguration, but is not an allowed configuration by the current /etc/rc.network6 script. >How-To-Repeat: Configure a box with two nics (the examples below assume fxp0 and fxp1). Try the following /etc/rc.conf config lines: network_interfaces="fxp0 lo0" ifconfig_fxp0="inet 209.249.106.101 netmask 255.255.255.240" defaultrouter="209.249.106.97" ipv6_enable="YES" ipv6_network_interfaces="fxp1" Due to the following code in /etc/rc.network6: # # manual configurations - in case ip6_gateway_enable=NO # you can configure only single interface, # as specification assumes that # autoconfigured host has single interface only. # set `ifconfig -l` ipv6_network_interfaces="$1" The code will override the ipv6_network_interfaces="fxp1" with ipv6_network_interfaces="fxp0" (the first interface in the box) in these lines. Note, it is unclear if ipv6_network_interfaces="fxp1" should really be ipv6_network_interfaces="fxp1 lo0", which makes more sense. The code does not seem to allow for this possibility either. >Fix: A simple hack would be to change set `ifconfig -l` to be set $ipv6_network_interfaces, allowing the second line to get the first specified interface, if more than one were specified. I believe more elaborte checking might be in order though, to allow lo0 to be configured as well, and to produce better warning / error messages. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message