summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2014-09-23 01:44:51 -0700
committerDavid S. Miller <davem@davemloft.net>2014-09-23 15:32:10 -0400
commit3c4d1daecef875d28bdbe93587908c897c29ba71 (patch)
treec72cc9f829ac085d787138e77e013b5cdc26cbe6 /drivers
parentbd1e75abf4b3c666f61a5cf90c896aa928a735d5 (diff)
downloadlinux-3c4d1daecef875d28bdbe93587908c897c29ba71.tar.bz2
vxlan: Fix bug introduced by commit acbf74a76300
Commit acbf74a76300 ("vxlan: Refactor vxlan driver to make use of the common UDP tunnel functions." introduced a bug in vxlan_xmit_one() function, causing it to transmit Vxlan packets without proper Vxlan header inserted. The change was not needed in the first place. Revert it. Reported-by: Tom Herbert <therbert@google.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/vxlan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 39c86536fb9b..34e102ec95c2 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1778,11 +1778,11 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
- err = udp_tunnel_xmit_skb(vxlan->vn_sock->sock, rt, skb,
- fl4.saddr, dst->sin.sin_addr.s_addr,
- tos, ttl, df, src_port, dst_port,
- !net_eq(vxlan->net,
- dev_net(vxlan->dev)));
+ err = vxlan_xmit_skb(vxlan->vn_sock, rt, skb,
+ fl4.saddr, dst->sin.sin_addr.s_addr,
+ tos, ttl, df, src_port, dst_port,
+ htonl(vni << 8),
+ !net_eq(vxlan->net, dev_net(vxlan->dev)));
if (err < 0)
goto rt_tx_error;