ipv4: Fix ip-header identification for gso packets.
Subsystems (2)
PATCH 1/1 ipv4: Fix ip-header identification for gso packets.
For TCP protocol 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 for TCP.
Reported-by Cong Wang <[email protected]>
Signed-off-by Pravin B Shelar <[email protected]>
--- net/ipv4/af_inet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/af_inet.c +1 -1
@@ -1334,7 +1334,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, iph->frag_off |=htons (IP_MF ); offset += (skb->len - skb->mac_len - iph->ihl *4 ); }else { -if (!(iph->frag_off &htons (IP_DF ))) +if (proto ==IPPROTO_TCP || !(iph->frag_off &htons (IP_DF ))) iph->id =htons (id++); } iph->tot_len =htons (skb->len - skb->mac_len);
Signature · 1 line
1.7.1
David Miller
maintainerFrom: Pravin B Shelar <[email protected]>
Date: Sat, 23 Mar 2013 21:10:48 -0700
Quoted 9 lines
For TCP protocol ip-header id needs to be incremented even if
IP_DFflag is set. This behaviour was changed in commit490ab08127cebc25e3a26(IP_GRE: Fix IP-Identification).Following patch fixes it so that identification is always incremented for TCP.
Reported-by Cong Wang <[email protected]>Signed-off-by Pravin B Shelar <[email protected]>
We should do this increment for all protocols when DF is set, not just TCP.