aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_vtr.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-10-24 07:55:53 -0700
committerFlorin Coras <florin.coras@gmail.com>2017-10-24 17:10:59 +0000
commit4c151b5fa13312639b0a5ef0d0efb1866bf4ed5e (patch)
tree509f9ca3de547394bceeda0821243ad8e40ab195 /src/vnet/l2/l2_vtr.h
parentaa0dda48ac69ec3af846355f24a7d84ec2cd2882 (diff)
Update L2 header offset after VLAN tag rewrite
Change-Id: I5c1df59bce7c9654101672a12981e5bd62e9adc4 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_vtr.h')
-rw-r--r--src/vnet/l2/l2_vtr.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/l2/l2_vtr.h b/src/vnet/l2/l2_vtr.h
index 0aea618e080..f6454bf1eac 100644
--- a/src/vnet/l2/l2_vtr.h
+++ b/src/vnet/l2/l2_vtr.h
@@ -105,9 +105,11 @@ l2_vtr_process (vlib_buffer_t * b0, vtr_config_t * config)
*((u64 *) eth) = temp_8;
*((u32 *) (eth + 8)) = temp_4;
- /* Update l2_len */
+ /* Update l2 parameters */
vnet_buffer (b0)->l2.l2_len +=
(word) config->push_bytes - (word) config->pop_bytes;
+ vnet_buffer (b0)->l2_hdr_offset -=
+ (word) config->push_bytes - (word) config->pop_bytes;
/* Update vlan tag count */
ethernet_buffer_adjust_vlan_count_by_bytes (b0,