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-26 13:50:05 -0400 |
commit | 330305cc4a6b0cb75c22fc01b8826f0ad755550f (patch) | |
tree | 91d73aaccb12054ba88c538c78a9c1559a0218c8 /include | |
parent | 9fe16b78ee17579cb4f333534cf7043e94c67024 (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>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 fd19625ff99d..982141c15200 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
@@ -77,15 +77,11 @@ static inline void tunnel_ip_select_ident(struct sk_buff *skb, | |||
77 | { | 77 | { |
78 | struct iphdr *iph = ip_hdr(skb); | 78 | struct iphdr *iph = ip_hdr(skb); |
79 | 79 | ||
80 | if (iph->frag_off & htons(IP_DF)) | 80 | /* Use inner packet iph-id if possible. */ |
81 | iph->id = 0; | 81 | if (skb->protocol == htons(ETH_P_IP) && old_iph->id) |
82 | else { | 82 | iph->id = old_iph->id; |
83 | /* Use inner packet iph-id if possible. */ | 83 | else |
84 | if (skb->protocol == htons(ETH_P_IP) && old_iph->id) | 84 | __ip_select_ident(iph, dst, |
85 | iph->id = old_iph->id; | 85 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); |
86 | else | ||
87 | __ip_select_ident(iph, dst, | ||
88 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); | ||
89 | } | ||
90 | } | 86 | } |
91 | #endif | 87 | #endif |