On Thu, 07 Mar 2002 10:49:22 -0800 Terry Lambert <[EMAIL PROTECTED]> wrote:

> Simon 'corecode' Schubert wrote:
> > to everybody who doesn't believe that: it really generates bad code.
> > i've been having severe problems with my tcp and udp stack lately (on a
> > i586/mmx machine). guess what, -O2 resulted in code which >>sometimes<<
> > generated bad tcp and/or udp checksums (depending on ip). i didn't
> > investigate any further, but believe me: not being able to access some
> > dns servers is a pain in the ass.
> 
> Are you using NAT?

yep.

> The libalias incremental checksum calculation is incorrect;
> it assumes that a two's complement network order underflow
> will result in the same value as a one's complement host
> order underflow.  This results in off-by-one errors.

so is this an optimisation issue or not? when compiling with -O it works
again. furthermore i don't know if my bind uses the internal address or
the external one for queries.

> This is actually a *different* problem than the RFC 1624
> correction of RFC 1141 (also an off-by-one error).
> 
> Have you used a recent version of ethereal?  It's an incredible
> bugger to get installed correctly for 4.5 or above, since you
> have to come from packages (the dependencies for the ports are
> incorrect), but it will tell you the correct checksum vs. the
> one that it got.
> 
> There's also printing it out in tcp_input when you get a bad
> checksum.  If you see a lot of "0xfffe", then you'll know it's
> an off-by-one error.

yah, got lots of them, seen in tcpdump -vvvxXlei gif0 ;]

> If the problem is only on ACK packets... I can tell you that
> the tcp_respond() code path is not really throughly exercised.

tho i've seen these problems recently on UDP DNS lookups, too. then i
switched back to -O

cheerz
  corecode


-- 
/"\   http://corecode.ath.cx/
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News

Attachment: msg32612/pgp00000.pgp
Description: PGP signature

Reply via email to