* [net-next] vxlan: Fix bug introduced by commit acbf74a76300
@ 2014-09-23 8:44 Andy Zhou
2014-09-23 19:33 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andy Zhou @ 2014-09-23 8:44 UTC (permalink / raw)
To: davem; +Cc: netdev, Andy Zhou, Eric Dumazet
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>
---
drivers/net/vxlan.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 39c8653..34e102e 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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net-next] vxlan: Fix bug introduced by commit acbf74a76300
2014-09-23 8:44 [net-next] vxlan: Fix bug introduced by commit acbf74a76300 Andy Zhou
@ 2014-09-23 19:33 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-09-23 19:33 UTC (permalink / raw)
To: azhou; +Cc: netdev, eric.dumazet
From: Andy Zhou <azhou@nicira.com>
Date: Tue, 23 Sep 2014 01:44:51 -0700
> 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>
Applied, thanks Andy.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-23 19:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-23 8:44 [net-next] vxlan: Fix bug introduced by commit acbf74a76300 Andy Zhou
2014-09-23 19:33 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).