aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-03-24 13:36:29 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-25 12:30:25 -0400
commit25c7704d8bdcf6746dab4397953df51759924b37 (patch)
tree827ce8d9cf89b2a19c248ad3ea1ec0763760ff9d /net/ipv4
parent5594c32187e4cb673d2ac815b1adb5a96d9f6254 (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 'net/ipv4')
-rw-r--r--net/ipv4/af_inet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 9e5882caf8a7..70b2d4cf5801 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1334,8 +1334,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb,
1334 iph->frag_off |= htons(IP_MF); 1334 iph->frag_off |= htons(IP_MF);
1335 offset += (skb->len - skb->mac_len - iph->ihl * 4); 1335 offset += (skb->len - skb->mac_len - iph->ihl * 4);
1336 } else { 1336 } else {
1337 if (!(iph->frag_off & htons(IP_DF))) 1337 iph->id = htons(id++);
1338 iph->id = htons(id++);
1339 } 1338 }
1340 iph->tot_len = htons(skb->len - skb->mac_len); 1339 iph->tot_len = htons(skb->len - skb->mac_len);
1341 iph->check = 0; 1340 iph->check = 0;