Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VPP-81: Print interface name after creating an interface with CLI
[vpp.git]
/
vnet
/
vnet
/
vxlan
/
vxlan.c
diff --git
a/vnet/vnet/vxlan/vxlan.c
b/vnet/vnet/vxlan/vxlan.c
index
89e56e7
..
9e0d0a5
100644
(file)
--- a/
vnet/vnet/vxlan/vxlan.c
+++ b/
vnet/vnet/vxlan/vxlan.c
@@
-419,6
+419,7
@@
vxlan_add_del_tunnel_command_fn (vlib_main_t * vm,
u32 tmp;
int rv;
vnet_vxlan_add_del_tunnel_args_t _a, * a = &_a;
u32 tmp;
int rv;
vnet_vxlan_add_del_tunnel_args_t _a, * a = &_a;
+ u32 sw_if_index;
/* Get a line of input. */
if (! unformat_user (input, unformat_line_input, line_input))
/* Get a line of input. */
if (! unformat_user (input, unformat_line_input, line_input))
@@
-504,11
+505,13
@@
vxlan_add_del_tunnel_command_fn (vlib_main_t * vm,
else foreach_copy_ipv6
#undef _
else foreach_copy_ipv6
#undef _
- rv = vnet_vxlan_add_del_tunnel (a,
0 /* hw_if_indexp */
);
+ rv = vnet_vxlan_add_del_tunnel (a,
&sw_if_index
);
switch(rv)
{
case 0:
switch(rv)
{
case 0:
+ if (is_add)
+ vlib_cli_output(vm, "%U\n", format_vnet_sw_if_index_name, vnet_get_main(), sw_if_index);
break;
case VNET_API_ERROR_INVALID_DECAP_NEXT:
return clib_error_return (0, "invalid decap-next...");
break;
case VNET_API_ERROR_INVALID_DECAP_NEXT:
return clib_error_return (0, "invalid decap-next...");