aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/map/ip4_map_t.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/map/ip4_map_t.c')
-rw-r--r--src/plugins/map/ip4_map_t.c10
1 files changed, 10 insertions, 0 deletions
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);