Commit 8dc98eb2 authored by Pravin B Shelar's avatar Pravin B Shelar Committed by David S. Miller

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: default avatarPravin B Shelar <pshelar@nicira.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 490ab081
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <net/arp.h> #include <net/arp.h>
#include <net/ndisc.h> #include <net/ndisc.h>
#include <net/ip.h> #include <net/ip.h>
#include <net/ipip.h>
#include <net/icmp.h> #include <net/icmp.h>
#include <net/udp.h> #include <net/udp.h>
#include <net/rtnetlink.h> #include <net/rtnetlink.h>
...@@ -962,13 +963,13 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -962,13 +963,13 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
iph->daddr = dst; iph->daddr = dst;
iph->saddr = fl4.saddr; iph->saddr = fl4.saddr;
iph->ttl = ttl ? : ip4_dst_hoplimit(&rt->dst); iph->ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
tunnel_ip_select_ident(skb, old_iph, &rt->dst);
vxlan_set_owner(dev, skb); vxlan_set_owner(dev, skb);
/* See iptunnel_xmit() */ /* See iptunnel_xmit() */
if (skb->ip_summed != CHECKSUM_PARTIAL) if (skb->ip_summed != CHECKSUM_PARTIAL)
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
ip_select_ident(iph, &rt->dst, NULL);
err = ip_local_out(skb); err = ip_local_out(skb);
if (likely(net_xmit_eval(err) == 0)) { if (likely(net_xmit_eval(err) == 0)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment