From: Jarek Poplawski <jarkao2@o2.pl>
To: Patrick McHardy <kaber@trash.net>
Cc: Michael Tokarev <mjt@tls.msk.ru>,
netdev@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] tcp_output: Re: rare bad TCP checksum with 2.6.19?
Date: Fri, 19 Jan 2007 15:32:28 +0100 [thread overview]
Message-ID: <20070119143228.GB3424@ff.dom.local> (raw)
In-Reply-To: <45B0B63C.3080201@trash.net>
On Fri, Jan 19, 2007 at 01:14:52PM +0100, Patrick McHardy wrote:
> Jarek Poplawski wrote:
> > Here is my patch proposal. If I'm not totally wrong,
> > there is a possibility that, during collapsing, empty
> > skb with FIN is added to "normal" packet and changes
> > its ip_summed field to CHECKSUM_NONE.
> >
> > diff -Nurp linux-2.6.19-/net/ipv4/tcp_output.c linux-2.6.19/net/ipv4/tcp_output.c
> > --- linux-2.6.19-/net/ipv4/tcp_output.c 2006-11-29 22:57:37.000000000 +0100
> > +++ linux-2.6.19/net/ipv4/tcp_output.c 2007-01-19 07:58:39.000000000 +0100
> > @@ -1590,7 +1590,8 @@ static void tcp_retrans_try_collapse(str
> >
> > memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size);
> >
> > - skb->ip_summed = next_skb->ip_summed;
> > + if (next_skb->ip_summed == CHECKSUM_PARTIAL)
> > + skb->ip_summed = CHECKSUM_PARTIAL;
> >
> > if (skb->ip_summed != CHECKSUM_PARTIAL)
> > skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size);
> >
>
> I noticed this too, but I can't see how it could lead to
> a partial checksum on the wire since the checksumming is
> done after changing ip_summed to CHECKSUM_NONE. Is this
> patch verified to fix Michael's problem?
No, this was intended as a proposal for testing.
I didn't verify all the checksum path here, but I
guessed such change during the summing could matter
(probably for skb_copy_and_csum_dev and maybe earlier)
and I couldn't find more suspicious change since 2.6.17
near this FINs. But if it really works, it shoudn't be
so hard to verify the mechanism, I hope.
Jarek P.
next prev parent reply other threads:[~2007-01-19 14:30 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-14 22:59 rare bad TCP checksum with 2.6.19? Michael Tokarev
2007-01-15 9:39 ` Herbert Xu
2007-01-15 13:34 ` Michael Tokarev
2007-01-15 14:25 ` Michael Tokarev
2007-01-15 18:13 ` Eric Dumazet
2007-01-15 19:33 ` Michael Tokarev
2007-01-15 23:36 ` Eric Dumazet
2007-01-15 20:10 ` Herbert Xu
2007-01-15 21:46 ` Michael Tokarev
2007-01-15 23:35 ` Herbert Xu
2007-01-16 3:27 ` Herbert Xu
2007-01-16 3:38 ` Herbert Xu
2007-01-16 8:08 ` Michael Tokarev
2007-01-16 11:50 ` Herbert Xu
2007-01-16 12:15 ` Patrick McHardy
2007-01-16 14:38 ` Michael Tokarev
2007-01-17 14:12 ` Michael Tokarev
2007-01-19 11:06 ` [PATCH] tcp_output: " Jarek Poplawski
2007-01-19 12:14 ` Patrick McHardy
2007-01-19 13:23 ` Michael Tokarev
2007-01-19 14:32 ` Jarek Poplawski [this message]
2007-01-19 13:20 ` Michael Tokarev
2007-01-19 14:08 ` Jarek Poplawski
2007-01-22 7:13 ` Jarek Poplawski
2007-01-22 7:19 ` Michael Tokarev
2007-01-22 8:03 ` Jarek Poplawski
2007-01-19 21:10 ` Herbert Xu
2007-01-22 6:52 ` Jarek Poplawski
2007-01-22 7:45 ` Herbert Xu
2007-01-22 8:48 ` Jarek Poplawski
2007-01-22 13:46 ` Patrick McHardy
2007-01-24 6:08 ` 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=20070119143228.GB3424@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=herbert@gondor.apana.org.au \
--cc=kaber@trash.net \
--cc=mjt@tls.msk.ru \
--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;
as well as URLs for NNTP newsgroup(s).