conf/89061: IPv6 6to4 auto-configuration enhancement
Antonio Querubin
tony at lava.net
Fri Dec 29 22:40:19 PST 2006
The following reply was made to PR conf/89061; it has been noted by GNATS.
From: Antonio Querubin <tony at lava.net>
To: bug-followup at 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 at lava.net
More information about the freebsd-rc
mailing list