From e5481092bb4bea9edb21b3967194acc7da214ae2 Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Mon, 13 Sep 2010 19:52:04 +0000 Subject: [PATCH] Fix $ipv6_network_interfaces and set it as AUTO by default. Based on: changes in r206408 by dougb --- etc/defaults/rc.conf | 2 +- etc/network.subr | 35 ++++++++++++----------------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index c875b28953d0..5ff00fcbfb62 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -444,7 +444,7 @@ ubthidhci_enable="NO" # Switch an USB BT controller present on icmp_bmcastecho="NO" # respond to broadcast ping packets ### IPv6 options: ### -ipv6_network_interfaces="none" # List of IPv6 network interfaces +ipv6_network_interfaces="auto" # List of IPv6 network interfaces # (or "auto" or "none"). ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO). #ipv6_defaultrouter="2002:c058:6301::" # Use this for 6to4 (RFC 3068) diff --git a/etc/network.subr b/etc/network.subr index e7b5945877c0..aba8e451a3ad 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -417,32 +417,21 @@ ipv6if() ;; esac - # True if $ifconfig_IF_ipv6 is defined. - _tmpargs=`_ifconfig_getargs $_if ipv6` - if [ -n "${_tmpargs}" ]; then - return 0 - fi - - # backward compatibility: True if $ipv6_ifconfig_IF is defined. - _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` - if [ -n "${_tmpargs}" ]; then - return 0 - fi - case "${ipv6_network_interfaces}" in - [Aa][Uu][Tt][Oo]) - return 0 - ;; - ''|[Nn][Oo][Nn][Ee]) - return 1 - ;; - esac - - for i in ${ipv6_network_interfaces}; do - if [ "$i" = "$_if" ]; then + $_if|"$_if "*|*" $_if"|*" $_if "*|[Aa][Uu][Tt][Oo]) + # True if $ifconfig_IF_ipv6 is defined. + _tmpargs=`_ifconfig_getargs $_if ipv6` + if [ -n "${_tmpargs}" ]; then return 0 fi - done + + # backward compatibility: True if $ipv6_ifconfig_IF is defined. + _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` + if [ -n "${_tmpargs}" ]; then + return 0 + fi + ;; + esac return 1 }