Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2010 19:52:04 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212575 - in head/etc: . defaults
Message-ID:  <201009131952.o8DJq4JA028397@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Mon Sep 13 19:52:04 2010
New Revision: 212575
URL: http://svn.freebsd.org/changeset/base/212575

Log:
  Fix $ipv6_network_interfaces and set it as AUTO by default.
  
  Based on:	changes in r206408 by dougb

Modified:
  head/etc/defaults/rc.conf
  head/etc/network.subr

Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf	Mon Sep 13 19:51:15 2010	(r212574)
+++ head/etc/defaults/rc.conf	Mon Sep 13 19:52:04 2010	(r212575)
@@ -444,7 +444,7 @@ ubthidhci_enable="NO"		# Switch an USB B
 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)

Modified: head/etc/network.subr
==============================================================================
--- head/etc/network.subr	Mon Sep 13 19:51:15 2010	(r212574)
+++ head/etc/network.subr	Mon Sep 13 19:52:04 2010	(r212575)
@@ -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
+	$_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
 
-	for i in ${ipv6_network_interfaces}; do
-		if [ "$i" = "$_if" ]; then
+		# backward compatibility: True if $ipv6_ifconfig_IF is defined.
+		_tmpargs=`get_if_var $_if ipv6_ifconfig_IF`
+		if [ -n "${_tmpargs}" ]; then
 			return 0
 		fi
-	done
+		;;
+	esac
 
 	return 1
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009131952.o8DJq4JA028397>