public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
* Re: webserver stalls [was Re: bug in (linux) slattach]
@ 2002-10-19 10:07 jb1
  2002-10-19 17:55 ` Gabucino
  0 siblings, 1 reply; 16+ messages in thread
From: jb1 @ 2002-10-19 10:07 UTC (permalink / raw)
  To: Harry Kalogirou; +Cc: linux-8086

Thanks to Blaz, who put me on the right track, I now know the format of
the tcpdumps I attached to my previous message in this thread. The first
twenty bytes of each packet are an IP header, the next twenty are a TCP
header, and any subsequent bytes are data.

The sixth 16-bit word of each packet is the IP Header Checksum. For each
case in which the connection to the ELKS webserver stalled, the IP Header
Checksum was *WRONG* in the packet the Red Hat 7.0 Linux box failed to
ACK. Furthermore it was always the *same* incorrect value (0xf6ff) in the
*same* packet (the one with the Content Length). The IP Header Checksum 
was correct (0xf5ff) for the 99-byte file that didn't stall. It looks to 
me like the Linux box is doing what it should, ignoring a packet with a 
bad IP checksum. I think the ELKS box is either failing to time out due to 
the missing ACK, or is erroneously "re-transmitting" what would be the 
next packet instead of the bad one.

There's something else strange about all the packets sent by ELKS: the IP
Identification field (the third 16-bit word of each packet) is always
zero, whereas the Linux box seems to increment that field each time it
sends a packet. Maybe ELKS is sending the wrong packet because it has the
same IP Identification.

Here's some information you might find useful:

1. The description of IP checksum algorithm in RFC-791 (and probably that
of the TCP Checksum in RFC-793) is, to put it kindly, misleading. It
should probably read something like, "The checksum is computed by doing a
16-bit add-with-carry of all the 16-bit words in the IP header except the
checksum field, itself, for which the value zero is assumed, then
complementing each bit of the sum".

2. I only glanced at it, but I think RFC-1624 discusses some boundary 
conditions under which commonly-used checksum algorithms fail.

3. When computing the ELKS IP Header Checksum, the only field that seems
to change from packet to packet (since the Identification is always zero
and the Header Checksum field is taken to be zero), is the Total Length
(the second 16-bit word). I was able to quickly test the accuracy of
checksums by precomputing the sum-with-carry of everything else, then
simply adding-with-carry the length, then inverting the bits. For all the 
tcpdumps I sent (including the one for the original 266 byte webpage) 
simply add-with-carry the second 16-bit word to 0x09c1, then complement 
that sum and compare it to the one in the tcpdump. Note that this applies 
only to IP headers sent by the ELKS box.


^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <1034621946.3293.92.camel@cool>]

end of thread, other threads:[~2002-10-29 12:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1035036158.454.17.camel@cool>
2002-10-20  9:34 ` webserver stalls [was Re: bug in (linux) slattach] jb1
2002-10-20 17:06   ` Harry Kalogirou
2002-10-21  9:44     ` jb1
2002-10-21  9:55       ` Harry Kalogirou
2002-10-22 10:16         ` jb1
2002-10-22 13:56           ` Harry Kalogirou
2002-10-22 13:57           ` [SOLVED] " Harry Kalogirou
2002-10-22 16:02             ` Harry Kalogirou
2002-10-23  9:37               ` jb1
2002-10-23 11:42                 ` Harry Kalogirou
2002-10-24  8:55                   ` jb1
2002-10-29 10:25               ` jb1
2002-10-29 12:37                 ` Harry Kalogirou
2002-10-19 10:07 jb1
2002-10-19 17:55 ` Gabucino
     [not found] <1034621946.3293.92.camel@cool>
2002-10-17 10:04 ` jb1

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox