netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ulrik De Bie" <ulrik.debie@newtec.be>
To: <jmorris@intercode.com.au>, <a@oo.ms>, <netdev@oss.sgi.com>
Subject: Fwd: tcp seq nr wrapping bug + patch
Date: Mon, 10 Mar 2003 16:16:13 +0100	[thread overview]
Message-ID: <se6cba6e.014@mailhost.newtec.be> (raw)

[-- Attachment #1: Type: text/plain, Size: 137 bytes --]

Hello,

I resend this patch which fixes a stupid mistake in the tcp sequence number in the 2.2 kernel.

Kind regards,
Ulrik De Bie

[-- Attachment #2: Type: message/rfc822, Size: 1205 bytes --]

From: "Ulrik De Bie" <ulrik.debie@newtec.be>
To: <alan.cox@linux.org>,<a@oo.ms>
Subject: tcp seq nr wrapping bug + patch
Date: Wed, 11 Sep 2002 17:36:27 +0200

When the sequence number in a tcp session is about to wrap for packets
leaving the system, a problem arises:

When the system call writev is called, with a count of 5 for instance, and the
second iov entry makes the sequence number wrap, then the other 3 will be
sent in separate packets, because the comparison will be wrong.

before() fixes this problem.

Sorry that I'm sending from a windows machine at the moment, I don't have
a linux mail machine available at the very moment.

Kind regards,
Ulrik De Bie
udb@newtec.be




--- linux-2.2.21/net/ipv4/tcp.c	Wed Sep 11 11:03:10 2002
+++ linux/net/ipv4/tcp.c	Wed Sep 11 17:27:53 2002
@@ -823,7 +823,7 @@
 				 */
 				if (skb_tailroom(skb) > 0 &&
 				    (mss_now - copy) > 0 &&
-				    tp->snd_nxt < TCP_SKB_CB(skb)->end_seq) {
+				    before(tp->snd_nxt , TCP_SKB_CB(skb)->end_seq)) {
 					int last_byte_was_odd = (copy % 4);
 
 					/* 



             reply	other threads:[~2003-03-10 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-10 15:16 Ulrik De Bie [this message]
2003-03-11 12:40 ` Fwd: tcp seq nr wrapping bug + patch James Morris

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=se6cba6e.014@mailhost.newtec.be \
    --to=ulrik.debie@newtec.be \
    --cc=a@oo.ms \
    --cc=jmorris@intercode.com.au \
    --cc=netdev@oss.sgi.com \
    /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;
as well as URLs for NNTP newsgroup(s).