summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/tap/tapv2_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/tap/tapv2_api.c')
-rw-r--r--src/vnet/devices/tap/tapv2_api.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vnet/devices/tap/tapv2_api.c b/src/vnet/devices/tap/tapv2_api.c
index ea618521aa4..ac38128daf8 100644
--- a/src/vnet/devices/tap/tapv2_api.c
+++ b/src/vnet/devices/tap/tapv2_api.c
@@ -83,7 +83,7 @@ vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp)
ap->num_rx_queues = mp->num_rx_queues;
if (mp->host_if_name_set)
- ap->host_if_name = mp->host_if_name;
+ ap->host_if_name = format (0, "%s%c", mp->host_if_name, 0);
if (mp->host_mac_addr_set)
{
@@ -91,10 +91,10 @@ vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp)
}
if (mp->host_namespace_set)
- ap->host_namespace = mp->host_namespace;
+ ap->host_namespace = format (0, "%s%c", mp->host_namespace, 0);
if (mp->host_bridge_set)
- ap->host_bridge = mp->host_bridge;
+ ap->host_bridge = format (0, "%s%c", mp->host_bridge, 0);
if (mp->host_ip4_prefix_set)
{
@@ -164,6 +164,11 @@ vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp)
rmp->sw_if_index = ntohl (ap->sw_if_index);
vl_api_send_msg (reg, (u8 *) rmp);
+
+ vec_free (ap->host_if_name);
+ vec_free (ap->host_namespace);
+ vec_free (ap->host_bridge);
+
}
static void