Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
4a98cf9
)
ipip: Don't crash when showing non-existant tunnel index
19/29819/2
author
Neale Ranns
<nranns@cisco.com>
Mon, 9 Nov 2020 10:13:24 +0000
(10:13 +0000)
committer
Matthew Smith
<mgsmith@netgate.com>
Thu, 19 Nov 2020 21:56:49 +0000
(21:56 +0000)
Type: fix
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9717d420e42098e291c5b6c7d18e935ad78fdc3d
src/vnet/ipip/ipip_cli.c
patch
|
blob
|
history
diff --git
a/src/vnet/ipip/ipip_cli.c
b/src/vnet/ipip/ipip_cli.c
index
510806b
..
231c7e3
100644
(file)
--- a/
src/vnet/ipip/ipip_cli.c
+++ b/
src/vnet/ipip/ipip_cli.c
@@
-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);