Subject: Re: Ospf Packet checksum

From: "Naidu, Venkata" <[email-masked]>
Date: Thu, 6 Mar 2003 18:13:24 -0500

-> To be conservative, however, you
-> should probably do your checksum computation *exactly* the
-> way RFC 1071 does it, and the RFC 1071 computations (usually)
-> produce 0-valued checksums rather than 0xffff.

  Correction. RFC 1141 obsoletes RFC 1071. But I prefer RFC 1624
  which updates RFC 1141. RFC 1624 reads:

   ...
   In one's complement, there are two representations of zero: the all
   zero and the all one bit values, often referred to as +0 and -0.
   One's complement addition of non-zero inputs can produce -0 as a
   result, but never +0.  Since there is guaranteed to be at least one
   non-zero field in the IP header, and the checksum field in the
   protocol header is the complement of the sum, the checksum field can
   never contain ~(+0), which is -0 (0xFFFF).  It can, however, contain
   ~(-0), which is +0 (0x0000).
   ...

Venkata.

---

From: Dennis Ferguson <[email-masked]>
Date: Thu, 6 Mar 2003 15:53:41 -0800

>   which updates RFC 1141. RFC 1624 reads:

That's no correction.  RFC's 1141 and 1624 update 1071 only with respect
to the computation of incremental updates of the IP header checksum, a
topic which takes up less than half of one page out of RFC 1071's 24 pages
and is not relevant to the issue of how to compute a checksum for the OSPF
packet.  RFC 1071 is still the canonical reference for the computation of
the IP 1's complement checksum, the other papers don't cover that.

Dennis Ferguson