summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2017-06-13 12:09:37 +0300
committerJohn Lo <loj@cisco.com>2017-06-14 07:08:18 +0000
commit6f7ebf900e6c65b73f8bb8f60ab5190cc2c893bc (patch)
treeed5ea4c76a6404768489d4a220552da771e256fd /src/vnet/l2
parent89111d0403c462e6a98e2452d4caa540da1c8587 (diff)
ETH:fix l2_len/vlan count mismatch for > 2 tags
l2_len was not updated for the third tag as the ethernet node retracts by the vlan count after parse_header (using ethernet_buffer_header_size) it ends up pointing before the ethernet header + some minor cleanups Change-Id: I4ccaedd33928912e5d837376f146503b27071741 Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/l2')
-rw-r--r--src/vnet/l2/l2_input_vtr.c15
-rw-r--r--src/vnet/l2/l2_vtr.c3
2 files changed, 3 insertions, 15 deletions
diff --git a/src/vnet/l2/l2_input_vtr.c b/src/vnet/l2/l2_input_vtr.c
index 60a39631e87..ded23095849 100644
--- a/src/vnet/l2/l2_input_vtr.c
+++ b/src/vnet/l2/l2_input_vtr.c
@@ -188,10 +188,7 @@ l2_invtr_node_fn (vlib_main_t * vm,
if (config0->output_vtr.push_and_pop_bytes)
{
/* perform the tag rewrite on two packets */
- if (l2_vtr_process
- (b0,
- &(vec_elt_at_index
- (l2output_main.configs, sw_if_index0)->input_vtr)))
+ if (l2_vtr_process (b0, &config0->input_vtr))
{
/* Drop packet */
next0 = L2_INVTR_NEXT_DROP;
@@ -212,10 +209,7 @@ l2_invtr_node_fn (vlib_main_t * vm,
{
if (config1->output_vtr.push_and_pop_bytes)
{
- if (l2_vtr_process
- (b1,
- &(vec_elt_at_index
- (l2output_main.configs, sw_if_index1)->input_vtr)))
+ if (l2_vtr_process (b1, &config1->input_vtr))
{
/* Drop packet */
next1 = L2_INVTR_NEXT_DROP;
@@ -305,10 +299,7 @@ l2_invtr_node_fn (vlib_main_t * vm,
if (config0->output_vtr.push_and_pop_bytes)
{
/* perform the tag rewrite on one packet */
- if (l2_vtr_process
- (b0,
- &(vec_elt_at_index
- (l2output_main.configs, sw_if_index0)->input_vtr)))
+ if (l2_vtr_process (b0, &config0->input_vtr))
{
/* Drop packet */
next0 = L2_INVTR_NEXT_DROP;
diff --git a/src/vnet/l2/l2_vtr.c b/src/vnet/l2/l2_vtr.c
index 3c5365f9b51..02a68991376 100644
--- a/src/vnet/l2/l2_vtr.c
+++ b/src/vnet/l2/l2_vtr.c
@@ -229,9 +229,6 @@ l2vtr_configure (vlib_main_t * vlib_main, vnet_main_t * vnet_main, u32 sw_if_ind
}
in_config->pop_bytes = 8;
in_config->push_bytes = 0;
-
- out_config->push_bytes = in_config->pop_bytes;
- out_config->pop_bytes = in_config->push_bytes;
break;
case L2_VTR_PUSH_1: