diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/interface_api.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c index 4cd2ec95b0f..b896433e959 100644 --- a/src/vnet/interface_api.c +++ b/src/vnet/interface_api.c @@ -239,38 +239,38 @@ send_sw_interface_details (vpe_api_main_t * am, mp->sub_default = sub->eth.flags.default_sub; mp->sub_outer_vlan_id_any = sub->eth.flags.outer_vlan_id_any; mp->sub_inner_vlan_id_any = sub->eth.flags.inner_vlan_id_any; + } - /* vlan tag rewrite data */ - u32 vtr_op = L2_VTR_DISABLED; - u32 vtr_push_dot1q = 0, vtr_tag1 = 0, vtr_tag2 = 0; + /* vlan tag rewrite data */ + u32 vtr_op = L2_VTR_DISABLED; + u32 vtr_push_dot1q = 0, vtr_tag1 = 0, vtr_tag2 = 0; - if (l2vtr_get (am->vlib_main, am->vnet_main, swif->sw_if_index, - &vtr_op, &vtr_push_dot1q, &vtr_tag1, &vtr_tag2) != 0) - { - // error - default to disabled - mp->vtr_op = ntohl (L2_VTR_DISABLED); - clib_warning ("cannot get vlan tag rewrite for sw_if_index %d", - swif->sw_if_index); - } - else - { - mp->vtr_op = ntohl (vtr_op); - mp->vtr_push_dot1q = ntohl (vtr_push_dot1q); - mp->vtr_tag1 = ntohl (vtr_tag1); - mp->vtr_tag2 = ntohl (vtr_tag2); - } + if (l2vtr_get (am->vlib_main, am->vnet_main, swif->sw_if_index, + &vtr_op, &vtr_push_dot1q, &vtr_tag1, &vtr_tag2) != 0) + { + // error - default to disabled + mp->vtr_op = ntohl (L2_VTR_DISABLED); + clib_warning ("cannot get vlan tag rewrite for sw_if_index %d", + swif->sw_if_index); + } + else + { + mp->vtr_op = ntohl (vtr_op); + mp->vtr_push_dot1q = ntohl (vtr_push_dot1q); + mp->vtr_tag1 = ntohl (vtr_tag1); + mp->vtr_tag2 = ntohl (vtr_tag2); } /* pbb tag rewrite data */ ethernet_header_t eth_hdr; - u32 vtr_op = L2_VTR_DISABLED; + u32 pbb_vtr_op = L2_VTR_DISABLED; u16 outer_tag = 0; u16 b_vlanid = 0; u32 i_sid = 0; clib_memset (ð_hdr, 0, sizeof (eth_hdr)); if (!l2pbb_get (am->vlib_main, am->vnet_main, swif->sw_if_index, - &vtr_op, &outer_tag, ð_hdr, &b_vlanid, &i_sid)) + &pbb_vtr_op, &outer_tag, ð_hdr, &b_vlanid, &i_sid)) { mp->sub_dot1ah = 1; clib_memcpy (mp->b_dmac, eth_hdr.dst_address, |