mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Todd Sabin <tas@webspan.net>
To: torvalds@transmeta.com, alan@lxorguk.ukuu.org.uk, davem@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] bad TCP checksums in tcp_retrans_try_collapse 2.4.5pre5 (at least)
Date: 29 Jun 2001 15:40:32 -0400	[thread overview]
Message-ID: <m3pubnoz0v.fsf@jetcar.qnz.org> (raw)


Hi,

We've been pulling our hair out lately trying to figure out why
certain connections of ours have been just stalling and dying.  It
turns out that the problem occurs when tcp segments are lost and then
coalesced into a single segment for retransmission.  When that
happens, a bad checksum is computed, and then the connection dies
while one end continually retransmits the same packet with a bad
checksum.

Here's a patch against 2.4.5pre5 which should fix it:

--- tcp_output.c~	Thu Apr 12 15:11:39 2001
+++ tcp_output.c	Fri Jun 29 13:58:31 2001
@@ -722,7 +722,7 @@
 
 		if (skb->ip_summed != CHECKSUM_HW) {
 			memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size);
-			skb->csum = csum_block_add(skb->csum, next_skb->csum, skb->len);
+			skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size);
 		}
 
 		/* Update sequence range on original skb. */


Hopefully the problem is obvious in retrospect.  skb_put(skb,...)
modifies skb->len, and the new value was being used in csum_block_add
instead of the original len.  We're testing the patch now, but it
seems fairly obvious and apparently other people have been reporting
similar problems so I wanted to get this out there...


Todd

p.s.  If there's followup, please Cc me directly, as I'm not
subscribed to lkml.

-- 
Todd Sabin                                               <tas@webspan.net>
BindView RAZOR Team                            <tsabin@razor.bindview.com>

             reply	other threads:[~2001-06-29 19:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-29 19:40 Todd Sabin [this message]
2001-06-29 21:14 ` David S. 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=m3pubnoz0v.fsf@jetcar.qnz.org \
    --to=tas@webspan.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®