From: Pravin B Shelar <pshelar@nicira.com>
To: amwang@redhat.com
Cc: netdev@vger.kernel.org, Pravin B Shelar <pshelar@nicira.com>
Subject: [PATCH net] ipv4: Fix ip-header identification for gso packets.
Date: Sat, 23 Mar 2013 21:10:48 -0700 [thread overview]
Message-ID: <1364098248-1766-1-git-send-email-pshelar@nicira.com> (raw)
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
next reply other threads:[~2013-03-24 4:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-24 4:10 Pravin B Shelar [this message]
2013-03-24 21:13 ` [PATCH net] ipv4: Fix ip-header identification for gso packets David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364098248-1766-1-git-send-email-pshelar@nicira.com \
--to=pshelar@nicira.com \
--cc=amwang@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox