summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2014-06-23 18:51:15 +0000
committerhenning <henning@openbsd.org>2014-06-23 18:51:15 +0000
commitcbcf7aa75c18eefcd720205771b5ca2007681e94 (patch)
tree709e40f7de38d50f15595f821c804a9e558fef49
parentSystemMemory is used to access memory mapped registers on some machines, so we (diff)
downloadwireguard-openbsd-cbcf7aa75c18eefcd720205771b5ca2007681e94.tar.xz
wireguard-openbsd-cbcf7aa75c18eefcd720205771b5ca2007681e94.zip
turn of IPv6 for new interfaces by default. this really just means there
is no link-local address assigned by default, which - by default, since INET6 is in the GENERIC kernels - makes the machine and services on it reachable. No such thing in IPv4 land. since assigning an inet6 address manually or running rtsol(d) etc resets the NOINET6 flag and causes the link-local to be assigned, this really is a noop for all inet6 users with the exception of those ONLY using the default link-local address. These needs to run "ifconfig <if> inet6 eui64" or put the equivalent in hostname.if. discussed at length with many, ok at least by krw todd benno sthen
-rw-r--r--sys/net/if.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 8b06554355e..f73f8d2698c 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.290 2014/06/07 11:04:14 henning Exp $ */
+/* $OpenBSD: if.c,v 1.291 2014/06/23 18:51:15 henning Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -423,6 +423,9 @@ if_attach(struct ifnet *ifp)
#else
TAILQ_INSERT_TAIL(&ifnet, ifp, if_list);
#endif
+#ifdef INET6
+ ifp->if_xflags |= IFXF_NOINET6;
+#endif
m_clinitifp(ifp);