+/**
+ Set the tag for the bridge domain.
+*/
+
+static void
+bd_set_bd_tag (vlib_main_t * vm, u32 bd_index, u8 * bd_tag)
+{
+ u8 *old;
+ l2_bridge_domain_t *bd_config;
+ vec_validate (l2input_main.bd_configs, bd_index);
+ bd_config = vec_elt_at_index (l2input_main.bd_configs, bd_index);
+
+ old = bd_config->bd_tag;
+
+ if (bd_tag[0])
+ {
+ bd_config->bd_tag = format (0, "%s%c", bd_tag, 0);
+ }
+ else
+ {
+ bd_config->bd_tag = NULL;
+ }
+
+ vec_free (old);
+}
+