From 8dc98eb2e8ccfbfb90348f8dc42f4a528a8a9961 Mon Sep 17 00:00:00 2001 From: Pravin B Shelar Date: Fri, 22 Feb 2013 07:30:40 +0000 Subject: [PATCH] VXLAN: Use tunnel_ip_select_ident() for tunnel IP-Identification. tunnel_ip_select_ident() is more efficient when generating ip-header id given inner packet is of ipv4 type. Signed-off-by: Pravin B Shelar Signed-off-by: David S. Miller --- drivers/net/vxlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 9d70421cf3a0..f736823f8437 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -962,13 +963,13 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev) iph->daddr = dst; iph->saddr = fl4.saddr; iph->ttl = ttl ? : ip4_dst_hoplimit(&rt->dst); + tunnel_ip_select_ident(skb, old_iph, &rt->dst); vxlan_set_owner(dev, skb); /* See iptunnel_xmit() */ if (skb->ip_summed != CHECKSUM_PARTIAL) skb->ip_summed = CHECKSUM_NONE; - ip_select_ident(iph, &rt->dst, NULL); err = ip_local_out(skb); if (likely(net_xmit_eval(err) == 0)) { -- GitLab