summaryrefslogtreecommitdiffstats
path: root/src/vnet/bonding/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bonding/cli.c')
-rw-r--r--src/vnet/bonding/cli.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index ec779e263a8..9d3b9429ba7 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -422,6 +422,7 @@ bond_create_if (vlib_main_t * vm, bond_create_if_args_t * args)
// for return
args->sw_if_index = bif->sw_if_index;
+ args->rv = 0;
}
static clib_error_t *
@@ -439,6 +440,7 @@ bond_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
args.id = ~0;
args.mode = -1;
args.lb = BOND_LB_L2;
+ args.rv = -1;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "mode %U", unformat_bond_mode, &args.mode))
@@ -471,6 +473,10 @@ bond_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
bond_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);
+
return args.error;
}