summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-10-21 18:32:59 +0200
committerBeno�t Ganne <bganne@cisco.com>2020-10-22 08:54:16 +0000
commit784bbcce05c545c3ef74c950d9d1e027c5e2c891 (patch)
tree6eade8da8e811dcc1f5d584ba7d5e82bfe3d5409 /src
parent6fa0988c02f56bb763ee17b11fdcf5372d50c5e9 (diff)
tap: fix the api for use of vec_len
Type: fix Fixes: 03b76a20c569b8275beb8783691300a7d66b54a4 Change-Id: Ife788974cb7b2c35f40a017dd195dc2f7ee797b4 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src')
-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