diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-03-24 13:36:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-25 12:30:25 -0400 |
commit | 25c7704d8bdcf6746dab4397953df51759924b37 (patch) | |
tree | 827ce8d9cf89b2a19c248ad3ea1ec0763760ff9d /include | |
parent | 5594c32187e4cb673d2ac815b1adb5a96d9f6254 (diff) |
ipv4: Fix ip-header identification for gso packets.
ip-header id needs to be incremented even if IP_DF flag is set.
This behaviour was changed in commit 490ab08127cebc25e3a26
(IP_GRE: Fix IP-Identification).
Following patch fixes it so that identification is always
incremented.
Reported-by: Cong Wang <amwang@redhat.com>
Acked-by: Cong Wang <amwang@redhat.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ipip.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/net/ipip.h b/include/net/ipip.h index 0c046e3bca05..483b91a10bb2 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
@@ -74,15 +74,11 @@ static inline void tunnel_ip_select_ident(struct sk_buff *skb, | |||
74 | { | 74 | { |
75 | struct iphdr *iph = ip_hdr(skb); | 75 | struct iphdr *iph = ip_hdr(skb); |
76 | 76 | ||
77 | if (iph->frag_off & htons(IP_DF)) | 77 | /* Use inner packet iph-id if possible. */ |
78 | iph->id = 0; | 78 | if (skb->protocol == htons(ETH_P_IP) && old_iph->id) |
79 | else { | 79 | iph->id = old_iph->id; |
80 | /* Use inner packet iph-id if possible. */ | 80 | else |
81 | if (skb->protocol == htons(ETH_P_IP) && old_iph->id) | 81 | __ip_select_ident(iph, dst, |
82 | iph->id = old_iph->id; | 82 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); |
83 | else | ||
84 | __ip_select_ident(iph, dst, | ||
85 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); | ||
86 | } | ||
87 | } | 83 | } |
88 | #endif | 84 | #endif |