svn commit: r345088 - head/libexec/rc
Bjoern A. Zeeb
bz at FreeBSD.org
Wed Mar 13 17:00:16 UTC 2019
Author: bz
Date: Wed Mar 13 17:00:15 2019
New Revision: 345088
URL: https://svnweb.freebsd.org/changeset/base/345088
Log:
Enhance IPv6 autoconf startup.
Before this change we would only run rtsol on an interface which was
set to accept_rtadv and did not have rtsold enabled. This change
removes the latter condition and always runs rtsol (rather than the
deferred rtsold) to reduce the delay until we send the first RS.
This change will also handle the accept_rtadv before dhcp hence
starting IPv6 auto-configuration before IPV4 DHCP.
This change is intended for FreeBSD 13 and later only and will not be MFCed.
Reviewed by: hrs
Differential Revision: https://reviews.freebsd.org/D19488
Modified:
head/libexec/rc/network.subr
Modified: head/libexec/rc/network.subr
==============================================================================
--- head/libexec/rc/network.subr Wed Mar 13 15:18:14 2019 (r345087)
+++ head/libexec/rc/network.subr Wed Mar 13 17:00:15 2019 (r345088)
@@ -229,6 +229,11 @@ ifconfig_up()
${IFCONFIG_CMD} $1 up
fi
+ if ! noafif $1 && afexists inet6; then
+ ipv6_accept_rtadv_up $1
+ _cfg=0
+ fi
+
if dhcpif $1; then
if [ $_cfg -ne 0 ] ; then
${IFCONFIG_CMD} $1 up
@@ -686,7 +691,6 @@ ipv6_up()
ifalias ${_if} inet6 alias && _ret=0
ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0
- ipv6_accept_rtadv_up ${_if} && _ret=0
return $_ret
}
@@ -1198,8 +1202,8 @@ ipv6_accept_rtadv_up()
{
if ipv6_autoconfif $1; then
${IFCONFIG_CMD} $1 inet6 accept_rtadv up
- if ! checkyesno rtsold_enable; then
- rtsol ${rtsol_flags} $1
+ if [ -x /sbin/rtsol ]; then
+ /sbin/rtsol ${rtsol_flags} $1
fi
fi
}
More information about the svn-src-all
mailing list