summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2012-01-22 10:57:32 +0000
committerhrs <hrs@FreeBSD.org>2012-01-22 10:57:32 +0000
commitdcf91b59f527006825b1fe7061dbb74973314fad (patch)
treee3379882b1fc8d6fd4f6efaaeef35a3a754dcceb /etc/rc.d
parent2e7b42f00f4c77a5b169c93d458a8fdedac13c2a (diff)
downloadFreeBSD-src-dcf91b59f527006825b1fe7061dbb74973314fad.zip
FreeBSD-src-dcf91b59f527006825b1fe7061dbb74973314fad.tar.gz
Fix several glitches in IPv6-related knobs:
- ipv6_enable + ipv6_gateway_enable should unset ACCEPT_RTADV by default for backward compatibility. - 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. MFC after: 1 week
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-xetc/rc.d/netif10
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/rc.d/netif b/etc/rc.d/netif
index 01da302..b584f15 100755
--- a/etc/rc.d/netif
+++ b/etc/rc.d/netif
@@ -123,16 +123,26 @@ network_common()
_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
OpenPOWER on IntegriCloud