diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2020-11-25 20:58:01 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2020-11-25 20:58:01 +0000 |
commit | dd4d5a5ffbfa65b61d30b3bfac0e09a75a8cbe3b (patch) | |
tree | 9e358c3823a8b078666b61a6da247485bd07f990 /libexec | |
parent | 2814e68675ce3869b0ccd9df68cd681862254e5b (diff) | |
download | src-dd4d5a5ffbfa65b61d30b3bfac0e09a75a8cbe3b.tar.gz src-dd4d5a5ffbfa65b61d30b3bfac0e09a75a8cbe3b.zip |
IPv6: set ifdisabled in the kernel rather than in rc
Enable ND6_IFF_IFDISABLED when the interface is created in the
kernel before return to user space.
This avoids a race when an interface is create by a program which
also calls ifconfig IF inet6 -ifdisabled and races with the
devd -> /etc/pccard_ether -> .. netif start IF -> ifdisabled
calls (the devd/rc framework disabling IPv6 again after the program
had enabled it already).
In case the global net.inet6.ip6.accept_rtadv was turned on,
we also default to enabling IPv6 on the interfaces, rather than
disabling them.
PR: 248172
Reported by: Gert Doering (gert greenie.muc.de)
Reviewed by: glebius (, phk)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D27324
Notes
Notes:
svn path=/head/; revision=368031
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rc/network.subr | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libexec/rc/network.subr b/libexec/rc/network.subr index 1a83421b87b2..808e48532a13 100644 --- a/libexec/rc/network.subr +++ b/libexec/rc/network.subr @@ -134,8 +134,6 @@ ifconfig_up() if ! noafif $1 && afexists inet6; then if checkyesno ipv6_activate_all_interfaces; then _ipv6_opts="-ifdisabled" - elif [ "$1" != "lo0" ]; then - _ipv6_opts="ifdisabled" fi # backward compatibility: $ipv6_enable |