Dennis Koegel <d...@neveragain.de> wrote
  in <20120110102405.ga82...@neveragain.de>:

dk> Cheers,
dk>
dk> problem: Having a *lot* of IPv6 interfaces (Vlan interfaces in this case)
dk> causes a huge and annoying delay time at system boot in 9.0R.
dk>
dk> ipv6_up() in network.subr does this:
dk>
dk> +   # wait for DAD
dk> +   sleep `${SYSCTL_N} net.inet6.ip6.dad_count`
dk> +   sleep 1
dk>
dk> This happens for each and every interface, at a minimum (and default) of
dk> two seconds per interface.
dk>
dk> It seems the behaviour was introduced with r197139. Before this merge,
dk> /etc/rc.d/network_ipv6 did the same sleeps, but only once for the whole
dk> network startup.
dk>
dk> I don't see why this should happen per interface, so I suggest the extra
dk> sleeps are limited to "once per network startup" once again (or maybe
dk> removed?).

 Can you try the attached patch and let me know if it works fine on
 your system?

-- Hiroki
Index: etc/network.subr
===================================================================
--- etc/network.subr	(revision 230227)
+++ etc/network.subr	(working copy)
@@ -559,10 +559,6 @@
 	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
 }

Index: etc/rc.d/netif
===================================================================
--- etc/rc.d/netif	(revision 230227)
+++ etc/rc.d/netif	(working copy)
@@ -123,16 +123,26 @@
 		_cooked_list="`list_net_interfaces`"
 	fi

+	_dadwait=
 	_fail=
 	_ok=
 	for ifn in ${_cooked_list}; do
 		if ${_func} ${ifn} $2; then
 			_ok="${_ok} ${ifn}"
+			if ipv6if ${ifn}; then
+				_dadwait=1
+			fi
 		else
 			_fail="${_fail} ${ifn}"
 		fi
 	done

+	# inet6 address configuration needs sleep for DAD.
+	if [ -n "${_dadwait}" ]; then
+		sleep `${SYSCTL_N} net.inet6.ip6.dad_count`
+		sleep 1
+	fi
+
 	_str=
 	if [ -n "${_ok}" ]; then
 		case ${_func} in

Attachment: pgpmM6sdsCmvS.pgp
Description: PGP signature

Reply via email to