summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2021-03-11 16:48:48 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2021-03-11 16:48:48 +0000
commite11bf0d1ccea0619116f542c8d0a4fdaac148525 (patch)
tree3dc6748151caf7dfc68eac9241a1d361fc1a06ce /sys/net
parentee5af7cdf65909dd02570c32842b56ccb429c859 (diff)
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
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c5
1 files 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();