From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: BUG: warning at net/core/dev.c:1171/skb_checksum_help() 2.6.18-rc3
Date: Thu, 03 Aug 2006 11:40:01 +0200 [thread overview]
Message-ID: <44D1C471.2050503@trash.net> (raw)
In-Reply-To: <20060803093309.GB8808@gondor.apana.org.au>
Herbert Xu wrote:
> On Thu, Aug 03, 2006 at 11:29:41AM +0200, Patrick McHardy wrote:
>
>>>>+u_int16_t nf_proto_csum_update(struct sk_buff *skb,
>>>>+ u_int32_t oldval, u_int32_t newval,
>>>>+ u_int16_t csum, int pseudohdr)
>>>>+{
>>>>+ if (skb->ip_summed != CHECKSUM_PARTIAL) {
>>>>+ csum = nf_csum_update(oldval, newval, csum);
>>>>+ if (skb->ip_summed == CHECKSUM_COMPLETE && pseudohdr)
>>>
>>>
>>>Shouldn't that be !pseudohdr?
>>
>>No, if the changed data is part of the pseudo-hdr, we need to update
>>skb->csum so the skb passes later checksum checks.
>
>
> Are you sure? If ip_summed is CHECKSUM_COMPLETE then skb->csum is the
> checksum of the payload *without* the pseudo header.
The pseudohdr is included indirectly through the tcp/udp checksum.
>>>This is a 32-bit quantity so nf_csum_update should eat a 32-bit quantity
>>>as well. Also, this checksum is not inverted so you need
>>>
>>> skb->csum = ~nf_csum_update(oldval, newval, ~skb->csum);
>>
>>I'll change it to 32-bit and try the inversion, but it works fine this
>>way.
>
>
> It'll break for e1000 at least since it puts the checksum into the
> high 16 bits of skb->csum (on i386).
Yes, the 32-bit thing is a bug, I meant it works fine without inverting
the checksum.
next prev parent reply other threads:[~2006-08-03 9:40 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 4:16 BUG: warning at net/core/dev.c:1171/skb_checksum_help() 2.6.18-rc3 David Coulson
2006-07-31 4:24 ` Patrick McHardy
2006-07-31 4:59 ` David Miller
2006-07-31 5:07 ` Patrick McHardy
2006-07-31 10:39 ` Patrick McHardy
2006-07-31 11:30 ` Herbert Xu
2006-07-31 18:36 ` Patrick McHardy
2006-07-31 21:15 ` David Miller
2006-07-31 21:36 ` Patrick McHardy
2006-07-31 21:54 ` David Miller
2006-08-01 7:00 ` David Miller
2006-08-01 7:04 ` Herbert Xu
2006-08-01 7:22 ` Patrick McHardy
2006-08-01 15:34 ` Phil Oester
2006-08-01 22:04 ` Herbert Xu
2006-08-01 7:19 ` Patrick McHardy
2006-08-01 7:23 ` Herbert Xu
2006-08-01 7:36 ` David Miller
2006-08-01 7:45 ` Herbert Xu
2006-08-01 12:00 ` Jamal Hadi Salim
2006-08-01 12:34 ` Herbert Xu
2006-08-01 12:55 ` Jamal Hadi Salim
2006-08-01 7:38 ` Patrick McHardy
2006-08-01 11:51 ` Herbert Xu
2006-08-03 9:21 ` Patrick McHardy
2006-08-03 9:30 ` Herbert Xu
2006-08-03 9:34 ` Patrick McHardy
2006-08-01 12:29 ` Herbert Xu
2006-08-03 9:29 ` Patrick McHardy
2006-08-03 9:33 ` Herbert Xu
2006-08-03 9:40 ` Patrick McHardy [this message]
2006-08-03 9:57 ` Herbert Xu
2006-08-05 7:13 ` Patrick McHardy
2006-08-05 7:59 ` Herbert Xu
2006-08-01 22:03 ` Herbert Xu
2006-08-03 9:30 ` Patrick McHardy
2006-08-02 0:49 ` Herbert Xu
2006-08-03 9:32 ` Patrick McHardy
2006-08-03 9:36 ` Herbert Xu
2006-08-03 9:43 ` Patrick McHardy
2006-07-31 4:34 ` Andrew Morton
2006-07-31 4:42 ` David Coulson
2006-07-31 4:58 ` 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=44D1C471.2050503@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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 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.