summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vxlan.c
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2016-09-28 14:26:43 +0000
committeryasuoka <yasuoka@openbsd.org>2016-09-28 14:26:43 +0000
commit4887531d8550cd705c340e8504b23a1c0746eba7 (patch)
treefaca498f77d23a4c1f7c9700d879d56cd9d03896 /sys/net/if_vxlan.c
parentFix the way of checking the length of vxlan packet and made it strict. (diff)
downloadwireguard-openbsd-4887531d8550cd705c340e8504b23a1c0746eba7.tar.xz
wireguard-openbsd-4887531d8550cd705c340e8504b23a1c0746eba7.zip
Fix vxlan to use the destination address correctly.
Use the dst of the bridge_tunneltag for src on vxlan output and vice versa. ok reyk
Diffstat (limited to 'sys/net/if_vxlan.c')
-rw-r--r--sys/net/if_vxlan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index de6bfdca69a..30b5a17ae2d 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vxlan.c,v 1.45 2016/09/28 14:10:35 yasuoka Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.46 2016/09/28 14:26:43 yasuoka Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
@@ -776,11 +776,11 @@ vxlan_output(struct ifnet *ifp, struct mbuf *m)
#if NBRIDGE > 0
if ((brtag = bridge_tunnel(m)) != NULL) {
- dst = &brtag->brtag_dst.sa;
+ dst = &brtag->brtag_src.sa;
/* If accepting any VNI, source ip address is from brtag */
if (sc->sc_vnetid == VXLAN_VNI_ANY) {
- src = &brtag->brtag_src.sa;
+ src = &brtag->brtag_dst.sa;
tag = (uint32_t)brtag->brtag_id;
af = src->sa_family;
}