IF: return VTR attributes for all ifs in dump API
With this commit, VTR attributes are shown not only for subinterfaces
but for all interfaces.
@@ -239,6 +239,7 @@ 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;
@@ -259,18 +260,17 @@ send_sw_interface_details (vpe_api_main_t * am,
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 (&eth_hdr, 0, sizeof (eth_hdr));
if (!l2pbb_get (am->vlib_main, am->vnet_main, swif->sw_if_index,
- &vtr_op, &outer_tag, &eth_hdr, &b_vlanid, &i_sid))
+ &pbb_vtr_op, &outer_tag, &eth_hdr, &b_vlanid, &i_sid))
{
mp->sub_dot1ah = 1;
clib_memcpy (mp->b_dmac, eth_hdr.dst_address,
