aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/tap/cli.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-07-01 10:26:43 +0200
committerDamjan Marion <dmarion@me.com>2019-07-24 12:03:30 +0000
commitc5d5327ac59a212ecbdbbcf57e648becd02a702d (patch)
treec2c5b17fa020ac85e684326367e5ee9cd708c06a /src/vnet/devices/tap/cli.c
parent1acdbc2fac0078d85dc55c5ed882f4f6ca0c024c (diff)
tap: print the interface name on cli when created
Type: feature Change-Id: If11f00574322c35c1780c31d5f7b47d30e083e35 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/tap/cli.c')
-rw-r--r--src/vnet/devices/tap/cli.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c
index c74d24a12a9..5bf38a38659 100644
--- a/src/vnet/devices/tap/cli.c
+++ b/src/vnet/devices/tap/cli.c
@@ -40,6 +40,7 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
args.id = ~0;
args.tap_flags = 0;
+ args.rv = -1;
/* Get a line of input. */
if (unformat_user (input, unformat_line_input, line_input))
@@ -103,6 +104,10 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
tap_create_if (vm, &args);
+ if (!args.rv)
+ vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name,
+ vnet_get_main (), args.sw_if_index);
+
vec_free (args.host_if_name);
vec_free (args.host_namespace);
vec_free (args.host_bridge);