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?

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.

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.

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

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to