linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@dm.cobaltmicro.com>
To: Geert.Uytterhoeven@cs.kuleuven.ac.be
Cc: Paul.Mackerras@cs.anu.edu.au, linuxppc-dev@lists.linuxppc.org,
	linux-m68k@lists.linux-m68k.org
Subject: Re: TCPv4 checksum errors
Date: Tue, 22 Dec 1998 02:11:47 -0800	[thread overview]
Message-ID: <199812221011.CAA09825@dm.cobaltmicro.com> (raw)
In-Reply-To: <Pine.LNX.4.03.9812221039490.5727-100000@mercator.cs.kuleuven.ac.be> (message from Geert Uytterhoeven on Tue, 22 Dec 1998 11:01:13 +0100 (CET))


   Date: Tue, 22 Dec 1998 11:01:13 +0100 (CET)
   From: Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>

   On Tue, 22 Dec 1998, David S. Miller wrote:
   > My suggestion is that since you can reproduce it, you should add code
   > next to this printk statement which dumps the entire packet in HEX to
   > the console.  Then you can see what and who is at fault and where.
   > If the packet is sufficiently small you can walk the checksum
   > algorithm by hand and verify it for this test case.

   Which one do I have to dump? skb->h.raw or skb->nh.raw? I guess
   skb->nh.iph->tot_len bytes at skb->nh.raw?

Look at what the code next to the printk is verifying:

		skb->csum = csum_partial((char *)th, len, 0);
		if (tcp_v4_check(th,len,skb->nh.iph->saddr,skb->nh.iph->daddr,skb->csum))

So you need all the bytes from 'th' to 'th + len'.  You also need the
values of the source and destination addresses from the IP header (at
skb->nh.iph->{saddr,daddr}).

Good luck.

Later,
David S. Miller
davem@dm.cobaltmicro.com

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

  reply	other threads:[~1998-12-22 10:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-21 21:49 TCPv4 checksum errors Geert Uytterhoeven
1998-12-22  3:07 ` Paul Mackerras
1998-12-22  7:21   ` Martin Costabel
1998-12-22  9:21   ` Geert Uytterhoeven
1998-12-22  9:35     ` David S. Miller
1998-12-22 10:01       ` Geert Uytterhoeven
1998-12-22 10:11         ` David S. Miller [this message]
1998-12-22 10:38           ` Geert Uytterhoeven
1998-12-22 10:13         ` Arno Griffioen
1998-12-23  9:14       ` Geert Uytterhoeven
1998-12-23 13:23         ` Gabriel Paubert
1998-12-23 21:58         ` Alan Cox
1998-12-24  7:36           ` David S. Miller
1998-12-28  9:20           ` Andreas Schwab
1998-12-28 13:04             ` Alan Cox
1998-12-28 13:12               ` Andreas Schwab
1998-12-24  3:57         ` Paul Mackerras

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=199812221011.CAA09825@dm.cobaltmicro.com \
    --to=davem@dm.cobaltmicro.com \
    --cc=Geert.Uytterhoeven@cs.kuleuven.ac.be \
    --cc=Paul.Mackerras@cs.anu.edu.au \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linuxppc-dev@lists.linuxppc.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).