Subject: Re: [lisp] IPv6 UDP checksum issue

From: [email-masked] (Noel Chiappa)
Date: Fri, 31 Jul 2009 09:47:40 -0400 (EDT)

> From: Lars Eggert <[email-masked]>

    > if a transport protocol is used for tunneling IP inside its payload, it
    > no longer strictly needs to checksum-protect its payload *if* you
    > require for the inner IP packet and its payload to be protected by some
    > sort of checksum.

Yes, exactly. Inside a LISP user-data packet, you will find one of two things:

- An IPv4 packet, in which case that packet is protected against mis-delivery
by its IP header checksum. (The payload in the user's packet may not be
protected by a checksum, but IPv4 allows applications to make this choice.)

- An IPv6 packet, in which case that packet is protected against mis-delivery
and damage by its header+payload checksum.

There are no other cases.

The UDP checksum in the outer header on LISP user-data does nothing, is
expensive/impossible to compute (depending on the hardware), and therefore the
correct practical engineering choice is to not compute it.

    > Nobody is going to implement a check that verifies that if a UDP
    > checksum of zero is encountered, that the payload of this UDP packet
    > contains an IP packet that has a payload that is protected by some
    > checksum. It's just too complicated.

You don't need to. There cannot be anything in an LISP user-data packet
_except_ an IP packet of some sort (see above).

	Noel

---

From: Benny Amorsen <[email-masked]>
Date: Fri, 31 Jul 2009 20:17:52 +0200

> correct practical engineering choice is to not compute it.

You will probably eventually see PC-based routers which verify all
checksums and drop invalid ones before letting the CPU see them, if the
IPv6 specs allow it. PC NIC's are optimized for host use, not for
routing, and therefore they look at the whole packets anyway. Most of
them probably don't do much for IPv6 yet, but that is only a matter of
time.

Now such routers may forever be sufficiently rare on the open Internet
that it is not a concern for LISP deployment. It seems prudent to try to
get a formal exception from the usual UDP checksum rules if you really
want to go for the no-checksum option.

Personally I would drop zero checksum UDP packets with a rate-limited
ICMP error when doing the LISP encapsulation. I would expect the number
of zero-checksum UDP packets to drop as more NIC's get the checksum
feature.

/Benny