Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c4d1dae authored by Andy Zhou's avatar Andy Zhou Committed by David S. Miller
Browse files

vxlan: Fix bug introduced by commit acbf74a7



Commit acbf74a7 ("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: default avatarTom Herbert <therbert@google.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarAndy Zhou <azhou@nicira.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd1e75ab
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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,
		err = vxlan_xmit_skb(vxlan->vn_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)));
				     htonl(vni << 8),
				     !net_eq(vxlan->net, dev_net(vxlan->dev)));

		if (err < 0)
			goto rt_tx_error;