X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fmap%2Fip4_map_t.c;h=bb5aa451bc532b0ea6487bce6c5c4cef50c1acba;hb=56817e2c486a26167783676774b0dea9c103b200;hp=d243a45cd417120320ab5284115946ad1b15bbdb;hpb=78b58f65f1c94d7a5efbf191b4a6e8b6cc12ae66;p=vpp.git diff --git a/src/plugins/map/ip4_map_t.c b/src/plugins/map/ip4_map_t.c index d243a45cd41..bb5aa451bc5 100644 --- a/src/plugins/map/ip4_map_t.c +++ b/src/plugins/map/ip4_map_t.c @@ -578,6 +578,16 @@ ip4_map_t (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) dst_port0 = -1; + if (PREDICT_FALSE (ip40->ttl == 1)) + { + icmp4_error_set_vnet_buffer (p0, ICMP4_time_exceeded, + ICMP4_time_exceeded_ttl_exceeded_in_transit, + 0); + p0->error = error_node->errors[MAP_ERROR_TIME_EXCEEDED]; + next0 = IP4_MAPT_NEXT_ICMP_ERROR; + goto trace; + } + bool df0 = ip40->flags_and_fragment_offset & clib_host_to_net_u16 (IP4_HEADER_FLAG_DONT_FRAGMENT);