From owner-svn-src-head@FreeBSD.ORG Mon Sep 13 19:52:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 861191065693; Mon, 13 Sep 2010 19:52:04 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4448FC0A; Mon, 13 Sep 2010 19:52:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJq4UA028400; Mon, 13 Sep 2010 19:52:04 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJq4JA028397; Mon, 13 Sep 2010 19:52:04 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201009131952.o8DJq4JA028397@svn.freebsd.org> From: Hiroki Sato Date: Mon, 13 Sep 2010 19:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212575 - in head/etc: . defaults X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:52:04 -0000 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 }