ofproto-dpif: Treat zero MPLS post-decrement TTL as invalid.
authorBen Pfaff <blp@nicira.com>
Thu, 7 Mar 2013 19:09:12 +0000 (11:09 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 7 Mar 2013 19:09:12 +0000 (11:09 -0800)
commitbe80bc65c1da6225d3de238c041906bb459ee8ea
tree4dbba3e85ad3676627fa2d91d966b6284cecc07f
parent4cd9ab26c3a265d168d082b9e50777b9306fe2f8
ofproto-dpif: Treat zero MPLS post-decrement TTL as invalid.

RFC 3443 says that an outgoing MPLS TTL of zero is invalid, so we must send
packets that have such a TTL post-decrement to the controller rather than
allowing them to continue through the OpenFlow tables.

Here is the text from RFC 3443 that implies this behavior:

   oTTL: This is the TTL value used as the outgoing TTL value (see
   section 3.5 for exception).  It is always (iTTL - 1) unless otherwise
   stated.

   oTTL Check: Check if oTTL is greater than 0.  If the oTTL Check is
   false, then the packet is not forwarded.  Note that the oTTL check is
   performed only if any outgoing TTL (either IP or MPLS) is set to oTTL
   (see section 3.5 for exception).

That is, the output TTL is one less than the input TTL, and a packet with
an output TTL of 0 must not be forwarded.

CC: Bruce Davie <bsd@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
ofproto/ofproto-dpif.c