diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2012-01-22 10:57:32 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2012-01-22 10:57:32 +0000 |
commit | f6e5ba31d2f0eef2d1351ae7042f110833d913f1 (patch) | |
tree | e3379882b1fc8d6fd4f6efaaeef35a3a754dcceb /etc/rc.d/netif | |
parent | 08adfbbf62c01fcea99d15b9b3f9637d5e7ddf11 (diff) | |
download | src-f6e5ba31d2f0eef2d1351ae7042f110833d913f1.tar.gz src-f6e5ba31d2f0eef2d1351ae7042f110833d913f1.zip |
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
Notes
Notes:
svn path=/head/; revision=230453
Diffstat (limited to 'etc/rc.d/netif')
-rwxr-xr-x | etc/rc.d/netif | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/rc.d/netif b/etc/rc.d/netif index 01da302c5dfe..b584f1584096 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 |