Re: [OFFTOPIC?] Re: 2.2.x kernels missend odd-sized ICMP pa

H. Peter Anvin (hpa@transmeta.com)
12 Apr 1999 03:12:15 GMT


Followup to: <199904120151.VAA02001@sleipnir.valparaiso.cl>
By author: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
In newsgroup: linux.dev.kernel
>
> BTW, Comer's "Internetworking with TPC/IP, vol 1" tells me that the
> checksum is computed by ones' complement sum of 16bit quantities in network
> byte order and stored in network byte order (i.e., big endian), the
> computation in ping.c:in_cksum is clearly in host format (little endian
> around here). What gives?
>

The reason one's complement (circular carry) is used is because it is
endian-independent. The littleendian checksum stored in littleendian
format is the same as the bigendian checksim stored in bigendian
format.

-hpa

-- 
"The user's computer downloads the ActiveX code and simulates a 'Blue
Screen' crash, a generally benign event most users are familiar with
and that would not necessarily arouse suspicions."
-- Security exploit description on http://www.zks.net/p3/how.asp

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/