From owner-svn-src-all@FreeBSD.ORG  Wed Jul 17 13:24:10 2013
Return-Path: <owner-svn-src-all@FreeBSD.ORG>
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D8ECF9F8;
 Wed, 17 Jul 2013 13:24:10 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id CB98CF2C;
 Wed, 17 Jul 2013 13:24:10 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6HDOAto092839;
 Wed, 17 Jul 2013 13:24:10 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6HDOApT092838;
 Wed, 17 Jul 2013 13:24:10 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307171324.r6HDOApT092838@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Wed, 17 Jul 2013 13:24:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r253422 - stable/9/etc
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Jul 2013 13:24:10 -0000

Author: hrs
Date: Wed Jul 17 13:24:10 2013
New Revision: 253422
URL: http://svnweb.freebsd.org/changeset/base/253422

Log:
  MFC r230453:
  
  - Configurations in ipv6_prefix_IF should be recognized even if there is no
    ifconfig_IF_ipv6.
  
  - DAD wait should be performed at once, not on a per-interface basis, if
    possible.  This fixes an issue that a system with a lot of IPv6-capable
    interfaces takes too long for booting.
  
  Approved by:	re (glebius)

Modified:
  stable/9/etc/network.subr
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/network.subr
==============================================================================
--- stable/9/etc/network.subr	Wed Jul 17 13:13:44 2013	(r253421)
+++ stable/9/etc/network.subr	Wed Jul 17 13:24:10 2013	(r253422)
@@ -116,7 +116,7 @@ ifconfig_up()
 			if ! checkyesno ipv6_gateway_enable; then
 				_ipv6_opts="${_ipv6_opts} accept_rtadv"
 			fi
-			;;
+		;;
 		esac
 
 		case $ipv6_cpe_wanif in
@@ -498,6 +498,12 @@ ipv6if()
 			return 0
 		fi
 
+		# True if $ipv6_prefix_IF is defined.
+		_tmpargs=`get_if_var $_if ipv6_prefix_IF`
+		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
@@ -616,10 +622,6 @@ ipv6_up()
 	ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0
 	ipv6_accept_rtadv_up ${_if} && _ret=0
 
-	# wait for DAD
-	sleep `${SYSCTL_N} net.inet6.ip6.dad_count`
-	sleep 1
-
 	return $_ret
 }