Subject: Re: Stupid checksum and next LSA begining question

From: "Naidu, Venkata" <[email-masked]>
Date: Thu, 18 Sep 2003 11:07:43 -0400

Erblich,

->         When given a "update packet with say 5 LSAs", and the
->         1st LSA in this packet has a checksum error, should
->         the rest of the LSAs in the update be attempted to be
->         processed?

  1. If you are talking about LSA checksum (which is Fletcher
     checksum).

     RFC 2328 page 142 section 13 says:
     . . .
     (1) Validate the LSA's LS checksum.  If the checksum turns out
         to be invalid, discard the LSA and get the next one from
         the Link State Update packet.
     . . .

  2. If you are talking about OSPF packet checksum

     RFC 2328 page 61 section 8.2 says:
     . . .
         The authentication procedure may also
         verify the checksum field in the OSPF packet header (which,
         when used, is set to the standard IP 16-bit one's complement
         checksum of the OSPF packet's contents after excluding the
         64-bit authentication field).  If the authentication
         procedure fails, the packet should be discarded.
     . . .

->         Note: If we have a checksum error, this means that the
->         length and the start of the next LSA COULD be wrong.
->
->         We could assume that checking the type of the next LSA
->         could be within a valid LSA type range, and still not
->         have the correct begining of the 2nd or 3rd ... LSAs.

  In such a case, OSPF packet checksum could be wrong. So, the
  whole OSPF packet will be discarded.

Venkata.

---

From: Acee Lindem <[email-masked]>
Date: Thu, 18 Sep 2003 11:20:25 -0400

Hi Venkata,

Agree with you.  One more point.

>         the Link State Update packet.

As Mitchell points out, the LSA length may be wrong. However, this is no
reason to discard the
whole packet since there is also a good possibility that the LSA length
is correct and subsequent
LSAs may be processed. In any case, an implementation should assure that
you don't parse beyond
the end of your received packet (irrespective of LSA checksum errors).