summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/interface_api.c')
-rw-r--r--src/vnet/interface_api.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 42fd14ee19d..63f7cad44a8 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -203,6 +203,26 @@ send_sw_interface_details (vpe_api_main_t * am,
}
}
+ /* pbb tag rewrite data */
+ u32 vtr_op = L2_VTR_DISABLED;
+ u16 outer_tag = 0;
+ u8 b_dmac[6];
+ u8 b_smac[6];
+ u16 b_vlanid = 0;
+ u32 i_sid = 0;
+ memset (b_dmac, 0, sizeof (b_dmac));
+ memset (b_smac, 0, sizeof (b_smac));
+
+ if (!l2pbb_get (am->vlib_main, am->vnet_main, swif->sw_if_index,
+ &vtr_op, &outer_tag, b_dmac, b_smac, &b_vlanid, &i_sid))
+ {
+ mp->sub_dot1ah = 1;
+ clib_memcpy (mp->b_dmac, b_dmac, sizeof (b_dmac));
+ clib_memcpy (mp->b_smac, b_smac, sizeof (b_smac));
+ mp->b_vlanid = b_vlanid;
+ mp->i_sid = i_sid;
+ }
+
tag = vnet_get_sw_interface_tag (vnm, swif->sw_if_index);
if (tag)
strncpy ((char *) mp->tag, (char *) tag, ARRAY_LEN (mp->tag) - 1);