summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2020-06-21 11:32:34 +0000
committerdlg <dlg@openbsd.org>2020-06-21 11:32:34 +0000
commit8cdd649513bf906e105019216d5d5fc9c59cf957 (patch)
tree185e5baf2071985c5cbb41b16caa5cf8f508ee37 /sys/netinet6
parentadd IFT_WIREGUARD. (diff)
downloadwireguard-openbsd-8cdd649513bf906e105019216d5d5fc9c59cf957.tar.xz
wireguard-openbsd-8cdd649513bf906e105019216d5d5fc9c59cf957.zip
wireguard can do ipv6, but doesnt do link local addresses.
i feel like i should add IFT_L3IPVLAN here so mgre(4) can take advantage of this too. from Matt Dunwoodie and Jason A. Donenfeld ok deraadt@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_ifattach.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 48e65e2186f..b019cce1b0b 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_ifattach.c,v 1.116 2020/03/17 09:53:59 tobhe Exp $ */
+/* $OpenBSD: in6_ifattach.c,v 1.117 2020/06/21 11:32:34 dlg Exp $ */
/* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */
/*
@@ -389,6 +389,13 @@ in6_ifattach(struct ifnet *ifp)
return (error);
}
+ /* Interfaces that rely on strong a priori cryptographic binding of
+ * IP addresses are incompatible with automatically assigned llv6. */
+ switch (ifp->if_type) {
+ case IFT_WIREGUARD:
+ return (0);
+ }
+
/* Assign a link-local address, if there's none. */
if (in6ifa_ifpforlinklocal(ifp, 0) == NULL) {
if (in6_ifattach_linklocal(ifp, NULL) != 0) {