ipip: Don't crash when showing non-existant tunnel index
Type: fix Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I9717d420e42098e291c5b6c7d18e935ad78fdc3d
This commit is contained in:

committed by
Matthew Smith

parent
4a98cf9648
commit
8b276df32f
@ -232,6 +232,8 @@ static clib_error_t *show_ipip_tunnel_command_fn(vlib_main_t *vm,
|
||||
({vlib_cli_output(vm, "%U", format_ipip_tunnel, t); }));
|
||||
/* *INDENT-ON* */
|
||||
} else {
|
||||
if (pool_is_free_index (gm->tunnels, ti))
|
||||
return clib_error_return(0, "unknown index:%d", ti);
|
||||
t = pool_elt_at_index(gm->tunnels, ti);
|
||||
if (t)
|
||||
vlib_cli_output(vm, "%U", format_ipip_tunnel, t);
|
||||
|
Reference in New Issue
Block a user