From owner-freebsd-rc@FreeBSD.ORG Sat Dec 30 06:40:19 2006 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A858616A403 for ; Sat, 30 Dec 2006 06:40:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 53EBF13C44B for ; Sat, 30 Dec 2006 06:40:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kBU6eJsd033697 for ; Sat, 30 Dec 2006 06:40:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kBU6eJWf033696; Sat, 30 Dec 2006 06:40:19 GMT (envelope-from gnats) Date: Sat, 30 Dec 2006 06:40:19 GMT Message-Id: <200612300640.kBU6eJWf033696@freefall.freebsd.org> To: freebsd-rc@FreeBSD.org From: Antonio Querubin Cc: Subject: Re: conf/89061: IPv6 6to4 auto-configuration enhancement X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Antonio Querubin List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 06:40:19 -0000 The following reply was made to PR conf/89061; it has been noted by GNATS. From: Antonio Querubin To: bug-followup@FreeBSD.org Cc: Subject: Re: conf/89061: IPv6 6to4 auto-configuration enhancement Date: Fri, 29 Dec 2006 20:15:57 -1000 (HST) Here's an updated patch that doesn't require /usr. --- /usr/src/etc/rc.d/network_ipv6 Thu Oct 7 03:55:26 2004 +++ /etc/rc.d/network_ipv6 Fri Dec 29 18:49:32 2006 @@ -100,6 +100,38 @@ fi # Setup IPv6 to IPv4 mapping + if checkyesno auto6to4_enable; then + # Determine the interface of the IPv4 default route. + ipv4_default_if=`route get default \ + | while read name val ; do + case ${name} in + interface:) + echo $val + break + ;; + esac + done` + # Define the 6to4 tunnel's IPv4 address to match the first + # IPv4 address of the IPv4 default interface. + stf_interface_ipv4addr=`ifconfig ${ipv4_default_if} inet \ + | while read family addr junk ; do + case ${family} in + inet) + echo $addr + break + ;; + esac + done` + # If no IPv6 default gateway is defined, use the RFC 3068 + # anycast address. + case ${ipv6_defaultrouter} in + [Nn][Oo] | '') + ipv6_defaultrouter="2002:c058:6301::" + ;; + *) + ;; + esac + fi network6_stf_setup # Install the "default interface" to kernel, which will be used ---------------- Antonio Querubin tony@lava.net