diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2016-09-28 14:26:44 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2016-09-28 14:26:44 +0000 |
commit | 5dfd996e0f3d57cc251bb53d64968499bc154046 (patch) | |
tree | 5deebf34da15dc1d2d75c9f115b41c16de572714 | |
parent | d7a57a01c493e8e1a5573fa924babef36847a906 (diff) |
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
-rw-r--r-- | sys/net/if_vxlan.c | 6 |
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; } |