summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnet/vnet/buffer.h15
-rw-r--r--vnet/vnet/ip/ip4_forward.c3
-rw-r--r--vnet/vnet/ip/ip6_forward.c3
3 files changed, 9 insertions, 12 deletions
diff --git a/vnet/vnet/buffer.h b/vnet/vnet/buffer.h
index cab716c23a8..7aaa6eed9ba 100644
--- a/vnet/vnet/buffer.h
+++ b/vnet/vnet/buffer.h
@@ -125,19 +125,10 @@ typedef struct
/* next protocol */
u32 save_protocol;
- };
-
- /* Alternate used for local TCP packets. */
- struct
- {
- u32 listener_index;
- u32 established_connection_index;
-
- u32 mini_connection_index;
-
- u32 transmit_stamp;
- } tcp;
+ /* Rewrite length */
+ u32 save_rewrite_length;
+ };
/* ICMP */
struct
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,