diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2018-04-09 02:25:27 -0700 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-04-09 13:32:12 +0000 |
commit | 7bf3f9f70e8395c13ed235cb48ec1787b07cf2d9 (patch) | |
tree | be0ff65b4101abedf9b039c72f9dd236e5a8cd44 | |
parent | 9690e906186cdc2b7d10eae934bcbad7bf45387d (diff) |
DVR: save the rewrite length in packet meta-data for features
Change-Id: I0efd03bdb84bc9ff2334d398bfdb82486228114a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
-rw-r--r-- | src/vnet/dpo/dvr_dpo.c | 12 |
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); |