cvs commit: src/sys/i386/include in_cksum.h
Brian Fundakowski Feldman
green at FreeBSD.org
Wed Aug 25 15:59:43 PDT 2004
On Wed, Aug 25, 2004 at 06:28:15PM +0000, David E. O'Brien wrote:
> obrien 2004-08-25 18:28:15 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/i386/include in_cksum.h
> Log:
> Fix a bug in in_cksum_hdr w/o -O.
>
> The C code assumes that the carry bit is always kept from the previous
> operation. However, the pointer indexing requires another add operation.
> Thus, the carry bit from the first operation is tromped over by the
> "addl" operation that ends up following it, so the "adcl" that follows
> that has no effect because the carry bit is cleared before it.
> The result is checksum failure on received packets.
Good job! Did you see any similar bugs in other in-line asm you might have
glanced at?
--
Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\
<> green at FreeBSD.org \ The Power to Serve! \
Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\
More information about the cvs-src
mailing list