aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_api.c
diff options
context:
space:
mode:
authorJerome Tollet <jtollet@cisco.com>2017-09-05 12:13:22 +0100
committerJohn Lo <loj@cisco.com>2017-09-07 07:48:53 +0000
commit483041413842e04f6958ae8cae4135dc2262d43b (patch)
tree608e8d306ff9b714b2f5432520f6148c9dab8455 /src/vnet/l2/l2_api.c
parentd05c155e346f73b1aa77e74c7a012ef9711dd1fa (diff)
Support for bridge domain free text tag
Change-Id: I9a75fdafd0c1d87b6f071fda5b77ff5f6b79deb7 Signed-off-by: Jerome Tollet <jtollet@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_api.c')
-rw-r--r--src/vnet/l2/l2_api.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index 989081fb4e2..20d6ab32fad 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -420,6 +420,7 @@ vl_api_bridge_domain_add_del_t_handler (vl_api_bridge_domain_add_del_t * mp)
.arp_term = mp->arp_term,
.mac_age = mp->mac_age,
.bd_id = ntohl (mp->bd_id),
+ .bd_tag = mp->bd_tag
};
int rv = bd_add_del (&a);
@@ -451,6 +452,13 @@ send_bridge_domain_details (l2input_main_t * l2im,
mp->arp_term = bd_feature_arp_term (bd_config);
mp->bvi_sw_if_index = ntohl (bd_config->bvi_sw_if_index);
mp->mac_age = bd_config->mac_age;
+ if (bd_config->bd_tag)
+ {
+ strncpy ((char *) mp->bd_tag, (char *) bd_config->bd_tag,
+ ARRAY_LEN (mp->bd_tag) - 1);
+ mp->bd_tag[ARRAY_LEN (mp->bd_tag) - 1] = 0;
+ }
+
mp->context = context;
sw_ifs = (vl_api_bridge_domain_sw_if_t *) mp->sw_if_details;