summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorhalex <halex@openbsd.org>2009-06-05 03:10:28 +0000
committerhalex <halex@openbsd.org>2009-06-05 03:10:28 +0000
commitf149e1321efefbd567ab16bcbc7ed4af3bcbf2da (patch)
treee0eebfe5caa27abfd640840222932da125624393 /sys
parentthis one too (diff)
downloadwireguard-openbsd-f149e1321efefbd567ab16bcbc7ed4af3bcbf2da.tar.xz
wireguard-openbsd-f149e1321efefbd567ab16bcbc7ed4af3bcbf2da.zip
Add missing #ifdef INET6 ... #endif
Makes non-IPv6 kernels build again blame and ok henning@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 8dd2fd9582b..f12eb449425 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.194 2009/06/05 00:05:21 claudio Exp $ */
+/* $OpenBSD: if.c,v 1.195 2009/06/05 03:10:28 halex Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1298,6 +1298,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p)
if ((error = suser(p, 0)) != 0)
return (error);
+#ifdef INET6
/* when IFXF_NOINET6 gets changed, detach/attach */
if (ifp->if_flags & IFF_UP && ifr->ifr_flags & IFXF_NOINET6 &&
!(ifp->if_xflags & IFXF_NOINET6))
@@ -1307,6 +1308,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p)
ifp->if_xflags &= ~IFXF_NOINET6;
in6_if_up(ifp);
}
+#endif
ifp->if_xflags = (ifp->if_xflags & IFXF_CANTCHANGE) |
(ifr->ifr_flags &~ IFXF_CANTCHANGE);