diff options
author | shin <shin@FreeBSD.org> | 2000-02-24 18:52:58 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-02-24 18:52:58 +0000 |
commit | 1f38e33d22f859166f6995f4fa28d9574458e156 (patch) | |
tree | 651973582897e3bf73a80caa546c3c151e5bcbf0 /etc/rc.network6 | |
parent | 298e37dd98bb0ce3f20c4e1ec61c1abcbdd16a1a (diff) | |
download | FreeBSD-src-1f38e33d22f859166f6995f4fa28d9574458e156.zip FreeBSD-src-1f38e33d22f859166f6995f4fa28d9574458e156.tar.gz |
-Remove IPv6 initialization failed interfaces from the list of
interfaces passed to rtadvd
-Comment out example sentences more completely
-Redirect error message of ifconfig output into /dev/null, to correctly
find out working IPv6 interfaces
Approved by: jkh
Diffstat (limited to 'etc/rc.network6')
-rw-r--r-- | etc/rc.network6 | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/etc/rc.network6 b/etc/rc.network6 index 595ef2a..f6a2115 100644 --- a/etc/rc.network6 +++ b/etc/rc.network6 @@ -100,6 +100,23 @@ network6_pass1() { sleep `sysctl -n net.inet6.ip6.dad_count` sleep 1 + # Filter out interfaces on which IPv6 addr init failed. + ipv6_working_interfaces="" + for i in ${ipv6_network_interfaces}; do + laddr=`ifconfig $i inet6 2>/dev/null | \ + grep 'inet6 fe80:' | \ + head -1 | grep -v tentative` + case ${laddr} in + '') + ;; + *) + ipv6_working_interfaces="$i \ + ${ipv6_working_interfaces}" + ;; + esac + done + ipv6_network_interfaces=${ipv6_working_interfaces} + # gifconfig network6_gif_setup @@ -139,11 +156,11 @@ network6_pass1() { # Enable Router Renumbering, unicast case # (use correct src/dst addr) # rtadvd -P "in ipsec ah/transport/fec0:0:0:1::1-fec0:0:0:10::1/require" \ - ${ipv6_network_interfaces} + # ${ipv6_network_interfaces} # Enable Router Renumbering, multicast case # (use correct src addr) # rtadvd -P "in ipsec ah/transport/ff05::2-fec0:0:0:10::1/require" \ - ${ipv6_network_interfaces} + # ${ipv6_network_interfaces} ;; esac @@ -213,7 +230,8 @@ network6_default_interface_setup() { case ${ipv6_default_interface} in '') for i in ${ipv6_network_interfaces}; do - laddr=`ifconfig $i inet6 | grep 'inet6 fe80:' | \ + laddr=`ifconfig $i inet6 2>/dev/null \ + | grep 'inet6 fe80:' | \ head -1 | grep -v tentative` case ${laddr} in '') |