* [PATCH net] ipv4: Fix ip-header identification for gso packets.
@ 2013-03-24 4:10 Pravin B Shelar
2013-03-24 21:13 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Pravin B Shelar @ 2013-03-24 4:10 UTC (permalink / raw)
To: amwang; +Cc: netdev, Pravin B Shelar
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 <amwang@redhat.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
---
net/ipv4/af_inet.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 9e5882c..4958b9d 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -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);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ipv4: Fix ip-header identification for gso packets.
2013-03-24 4:10 [PATCH net] ipv4: Fix ip-header identification for gso packets Pravin B Shelar
@ 2013-03-24 21:13 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-03-24 21:13 UTC (permalink / raw)
To: pshelar; +Cc: amwang, netdev
From: Pravin B Shelar <pshelar@nicira.com>
Date: Sat, 23 Mar 2013 21:10:48 -0700
> 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 <amwang@redhat.com>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
We should do this increment for all protocols when DF is set,
not just TCP.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-24 21:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-24 4:10 [PATCH net] ipv4: Fix ip-header identification for gso packets Pravin B Shelar
2013-03-24 21:13 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.