diff options
author | 2016-08-24 18:36:03 -0400 | |
---|---|---|
committer | 2016-08-25 17:50:57 +0000 | |
commit | c7493e16f5f571f8fcf08dba4071d5bc2ee7cdd0 (patch) | |
tree | b8100500bfa27c6b7aed8cb8fcc461689cae7964 /vnet/vnet/ip | |
parent | 4fe2291bbdf67251bb42ce742d8d481b901e1d1c (diff) |
Save rewrite length for post-rewrite rewind action
Change-Id: I5dd52714f8422c15bf78da19bcb63246f9d0103d
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vnet/vnet/ip')
-rw-r--r-- | vnet/vnet/ip/ip4_forward.c | 3 | ||||
-rw-r--r-- | vnet/vnet/ip/ip6_forward.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c index dd9fce4592b..8113cd72219 100644 --- a/vnet/vnet/ip/ip4_forward.c +++ b/vnet/vnet/ip/ip4_forward.c @@ -2825,6 +2825,8 @@ ip4_rewrite_inline (vlib_main_t * vm, /* Worth pipelining. No guarantee that adj0,1 are hot... */ rw_len0 = adj0[0].rewrite_header.data_bytes; rw_len1 = adj1[0].rewrite_header.data_bytes; + vnet_buffer(p0)->ip.save_rewrite_length = rw_len0; + vnet_buffer(p1)->ip.save_rewrite_length = rw_len1; /* Check MTU of outgoing interface. */ error0 = (vlib_buffer_length_in_chain (vm, p0) > adj0[0].rewrite_header.max_l3_packet_bytes @@ -3006,6 +3008,7 @@ ip4_rewrite_inline (vlib_main_t * vm, /* Update packet buffer attributes/set output interface. */ rw_len0 = adj0[0].rewrite_header.data_bytes; + vnet_buffer(p0)->ip.save_rewrite_length = rw_len0; if (PREDICT_FALSE (rw_len0 > sizeof(ethernet_header_t))) vlib_increment_combined_counter diff --git a/vnet/vnet/ip/ip6_forward.c b/vnet/vnet/ip/ip6_forward.c index 6ceb5741ed8..b076ed0403e 100644 --- a/vnet/vnet/ip/ip6_forward.c +++ b/vnet/vnet/ip/ip6_forward.c @@ -2490,6 +2490,8 @@ ip6_rewrite_inline (vlib_main_t * vm, rw_len0 = adj0[0].rewrite_header.data_bytes; rw_len1 = adj1[0].rewrite_header.data_bytes; + vnet_buffer(p0)->ip.save_rewrite_length = rw_len0; + vnet_buffer(p1)->ip.save_rewrite_length = rw_len1; vlib_increment_combined_counter (&lm->adjacency_counters, cpu_index, @@ -2631,6 +2633,7 @@ ip6_rewrite_inline (vlib_main_t * vm, /* Update packet buffer attributes/set output interface. */ rw_len0 = adj0[0].rewrite_header.data_bytes; + vnet_buffer(p0)->ip.save_rewrite_length = rw_len0; vlib_increment_combined_counter (&lm->adjacency_counters, cpu_index, |