aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_punt_drop.h
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2021-04-13 21:14:55 +0200
committerMatthew Smith <mgsmith@netgate.com>2021-05-11 21:21:27 +0000
commit7b2917fbe2a9ec17f69ca94fcbae534927915834 (patch)
tree5d6ce04cc966fd5b9812576568903a8ad8911691 /src/vnet/ip/ip_punt_drop.h
parent1bd6cbb7aeded36cca4402d0c970b593316c9d70 (diff)
ip: ensure ttl doesn't decrease to 0 when punting
Change-Id: I248ef12fd34ea2a1c383fbcc530a8ffeb31ba92b Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip_punt_drop.h')
-rw-r--r--src/vnet/ip/ip_punt_drop.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/ip/ip_punt_drop.h b/src/vnet/ip/ip_punt_drop.h
index 16d46ba190e..a595e446adc 100644
--- a/src/vnet/ip/ip_punt_drop.h
+++ b/src/vnet/ip/ip_punt_drop.h
@@ -349,6 +349,8 @@ ip_punt_redirect (vlib_main_t * vm,
if (PREDICT_TRUE (INDEX_INVALID != rrxi0))
{
+ /* prevent ttl decrement on forward */
+ b0->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
rrx0 = ip_punt_redirect_get (rrxi0);
vnet_buffer (b0)->ip.adj_index[VLIB_TX] = rrx0->dpo.dpoi_index;
next0 = rrx0->dpo.dpoi_next_node;