summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vxlan.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2019-04-28 22:15:57 +0000
committermpi <mpi@openbsd.org>2019-04-28 22:15:57 +0000
commit96c4247ccbf78c38f00780e28567a99a63d7bf42 (patch)
tree79d5e244376310b8fa18e3191a7ee50f295e17de /sys/net/if_vxlan.c
parentSupport multiple occurances of the same argument. Use this for a new (diff)
downloadwireguard-openbsd-96c4247ccbf78c38f00780e28567a99a63d7bf42.tar.xz
wireguard-openbsd-96c4247ccbf78c38f00780e28567a99a63d7bf42.zip
Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.
This redefines the ifp <-> bridge relationship. No lock can be currently used across the multiples contexts where the bridge has tentacles to protect a pointer, use an interface index. Tested by various, ok dlg@, visa@
Diffstat (limited to 'sys/net/if_vxlan.c')
-rw-r--r--sys/net/if_vxlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index 73535393979..ca42e7f8a21 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vxlan.c,v 1.71 2019/04/23 10:53:45 dlg Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.72 2019/04/28 22:15:58 mpi Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
@@ -711,7 +711,7 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen,
#if NBRIDGE > 0
/* Store the tunnel src/dst IP and vni for the bridge or switch */
- if ((ifp->if_bridgeport != NULL || ifp->if_switchport != NULL) &&
+ if ((ifp->if_bridgeidx != 0 || ifp->if_switchport != NULL) &&
srcsa->sa_family != AF_UNSPEC &&
((brtag = bridge_tunneltag(m)) != NULL)) {
memcpy(&brtag->brtag_peer.sa, srcsa, srcsa->sa_len);