diff options
author | 2021-03-20 17:08:57 +0000 | |
---|---|---|
committer | 2021-03-20 17:08:57 +0000 | |
commit | c937a45692528ce9b57f0a25d70ace28f368abee (patch) | |
tree | ae4730f34536bed82e46f874418375a21a5eb1a0 | |
parent | RFC 8981 allows the configuration of only temporary IPv6 addresses. (diff) | |
download | wireguard-openbsd-c937a45692528ce9b57f0a25d70ace28f368abee.tar.xz wireguard-openbsd-c937a45692528ce9b57f0a25d70ace28f368abee.zip |
RFC 8981 allows the configuration of only temporary IPv6 addresses.
Make the interface come up when the IFXF_AUTOCONF6TEMP is set.
OK kn
-rw-r--r-- | sys/net/if.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 0da3720b838..e5c5e65129d 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.638 2021/03/18 15:58:58 claudio Exp $ */ +/* $OpenBSD: if.c,v 1.639 2021/03/20 17:08:57 florian Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1958,8 +1958,10 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) NET_LOCK(); #ifdef INET6 - if (ISSET(ifr->ifr_flags, IFXF_AUTOCONF6) && - !ISSET(ifp->if_xflags, IFXF_AUTOCONF6)) { + if ((ISSET(ifr->ifr_flags, IFXF_AUTOCONF6) || + ISSET(ifr->ifr_flags, IFXF_AUTOCONF6TEMP)) && + !ISSET(ifp->if_xflags, IFXF_AUTOCONF6) && + !ISSET(ifp->if_xflags, IFXF_AUTOCONF6TEMP)) { error = in6_ifattach(ifp); if (error != 0) { NET_UNLOCK(); @@ -2026,7 +2028,9 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) ((!ISSET(oif_xflags, IFXF_AUTOCONF4) && ISSET(ifp->if_xflags, IFXF_AUTOCONF4)) || (!ISSET(oif_xflags, IFXF_AUTOCONF6) && - ISSET(ifp->if_xflags, IFXF_AUTOCONF6)))) { + ISSET(ifp->if_xflags, IFXF_AUTOCONF6)) || + (!ISSET(oif_xflags, IFXF_AUTOCONF6TEMP) && + ISSET(ifp->if_xflags, IFXF_AUTOCONF6TEMP)))) { ifr->ifr_flags = ifp->if_flags | IFF_UP; cmd = SIOCSIFFLAGS; goto forceup; |