summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-04-09 02:25:27 -0700
committerChris Luke <chris_luke@comcast.com>2018-04-11 19:17:03 +0000
commit18744ee68064854f68f3f05fd74290477b055431 (patch)
treedf10336541e1f5c987ef6bef4c822437c4db222d /src/vnet
parent1a2b9e6d73876f7c420184b78d46e14f586402bc (diff)
DVR: save the rewrite length in packet meta-data for featuresv18.04-rc2
Change-Id: I0efd03bdb84bc9ff2334d398bfdb82486228114a Signed-off-by: Neale Ranns <neale.ranns@cisco.com> (cherry picked from commit 7bf3f9f70e8395c13ed235cb48ec1787b07cf2d9)
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/dpo/dvr_dpo.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vnet/dpo/dvr_dpo.c b/src/vnet/dpo/dvr_dpo.c
index 02b97ee2e9f..39a8a631ebd 100644
--- a/src/vnet/dpo/dvr_dpo.c
+++ b/src/vnet/dpo/dvr_dpo.c
@@ -288,8 +288,12 @@ dvr_dpo_inline (vlib_main_t * vm,
(u8*)ethernet_buffer_get_header(b0));
len1 = ((u8*)vlib_buffer_get_current(b1) -
(u8*)ethernet_buffer_get_header(b1));
- vnet_buffer(b0)->l2.l2_len = len0;
- vnet_buffer(b1)->l2.l2_len = len1;
+ vnet_buffer(b0)->l2.l2_len =
+ vnet_buffer(b0)->ip.save_rewrite_length =
+ len0;
+ vnet_buffer(b1)->l2.l2_len =
+ vnet_buffer(b1)->ip.save_rewrite_length =
+ len1;
b0->flags |= VNET_BUFFER_F_IS_DVR;
b1->flags |= VNET_BUFFER_F_IS_DVR;
@@ -349,7 +353,9 @@ dvr_dpo_inline (vlib_main_t * vm,
*/
len0 = ((u8*)vlib_buffer_get_current(b0) -
(u8*)ethernet_buffer_get_header(b0));
- vnet_buffer(b0)->l2.l2_len = len0;
+ vnet_buffer(b0)->l2.l2_len =
+ vnet_buffer(b0)->ip.save_rewrite_length =
+ len0;
b0->flags |= VNET_BUFFER_F_IS_DVR;
vlib_buffer_advance(b0, -len0);