From aa770b8801c9829c5212c45642dcb3d04f738a3d Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 11 Mar 2021 16:48:47 +0000 Subject: [PATCH] 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 --- sys/net/if.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); -- 2.20.1