VPP-48 Fixes for ip4/6 ttl checks and icmp responses 54/1654/6
authorChris Luke <chrisy@flirble.org>
Tue, 14 Jun 2016 20:24:47 +0000 (16:24 -0400)
committerDave Barach <openvpp@barachs.net>
Tue, 28 Jun 2016 23:35:13 +0000 (23:35 +0000)
commit816f3e1b879b43802ea8035d6a3f1cbf5db76825
tree84365630b1fa8faffc1c1ecd3e1a290d3afbbf50
parent154d445f7f8f1553d9bb00d1be42bf1b06eda9f1
VPP-48 Fixes for ip4/6 ttl checks and icmp responses

This patch fixes a few minor things:

- Previously ip[46]_input was rejecting packets with an input TTL (hop
  limit) of one; this was not correct behavior. Packets that are bound
  for this device can validly have a TTL of one.
- ip[46]_forward was not generating an ICMP TTL expired message if the
  act of decrementing the TTL caused it to become zero. This was not
  previously an issue because ip[46]_input was filtering packets where
  this could happen.
- udp_local was not generating ICMP Port Unreachable messages if
  UDP packets arrived for a port that is not listened to. This is
  typically the signal that "traceroute" uses to terminate its
  search.

Together these fixes mean that traceroute probes transiting a VPP
node, or are targetted toward a VPP node, now work as expected.

Change-Id: I84bb940883f7a18435f29f4518fb0445b989a3e3
Signed-off-by: Chris Luke <chrisy@flirble.org>
vnet/vnet/ip/icmp4.h
vnet/vnet/ip/ip4_forward.c
vnet/vnet/ip/ip4_input.c
vnet/vnet/ip/ip6_forward.c
vnet/vnet/ip/ip6_input.c
vnet/vnet/ip/udp_local.c