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 /sys/netinet6 | |
| parent | 2814e68675ce3869b0ccd9df68cd681862254e5b (diff) | |
Notes
Diffstat (limited to 'sys/netinet6')
| -rw-r--r-- | sys/netinet6/nd6.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 1597a4cb6b93e..8ff6d1aafc745 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -273,6 +273,10 @@ nd6_ifattach(struct ifnet *ifp) nd->flags = ND6_IFF_PERFORMNUD; + /* Set IPv6 disabled on all interfaces but loopback by default. */ + if ((ifp->if_flags & IFF_LOOPBACK) == 0) + nd->flags |= ND6_IFF_IFDISABLED; + /* A loopback interface always has ND6_IFF_AUTO_LINKLOCAL. * XXXHRS: Clear ND6_IFF_AUTO_LINKLOCAL on an IFT_BRIDGE interface by * default regardless of the V_ip6_auto_linklocal configuration to @@ -290,8 +294,11 @@ nd6_ifattach(struct ifnet *ifp) */ if (V_ip6_accept_rtadv && !(ifp->if_flags & IFF_LOOPBACK) && - (ifp->if_type != IFT_BRIDGE)) + (ifp->if_type != IFT_BRIDGE)) { nd->flags |= ND6_IFF_ACCEPT_RTADV; + /* If we globally accept rtadv, assume IPv6 on. */ + nd->flags &= ~ND6_IFF_IFDISABLED; + } if (V_ip6_no_radr && !(ifp->if_flags & IFF_LOOPBACK)) nd->flags |= ND6_IFF_NO_RADR; |
