From: florian Date: Thu, 11 Mar 2021 16:48:47 +0000 (+0000) Subject: There is no need to try to attach IPv6 to an interface when the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aa770b8801c9829c5212c45642dcb3d04f738a3d;p=openbsd There is no need to try to attach IPv6 to an interface when the AUTOCONF6 flag is already set. This is likely a leftover from when we sent router solicitations from the kernel. This was a way to trigger sending a solicitation from userland. OK kn --- diff --git a/sys/net/if.c b/sys/net/if.c index 912ce495661..3e40c59d213 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.635 2021/03/11 15:56:27 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.636 2021/03/11 16:48:47 florian Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1958,7 +1958,8 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) NET_LOCK(); #ifdef INET6 - if (ISSET(ifr->ifr_flags, IFXF_AUTOCONF6)) { + if (ISSET(ifr->ifr_flags, IFXF_AUTOCONF6) && + !ISSET(ifp->if_xflags, IFXF_AUTOCONF6)) { error = in6_ifattach(ifp); if (error != 0) { NET_UNLOCK();