diff options
author | ShivaShankarK <shivaashankar1204@gmail.com> | 2020-04-10 18:20:02 +0530 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-04-11 17:07:43 +0000 |
commit | 35acaac1843839f94e9bd40ad45a8d170a155f22 (patch) | |
tree | 58c6190e64341f9bb9f46491dd80eed18664f51a /src/vnet/dpo/replicate_dpo.c | |
parent | 256779c85725c75de185f5cba9a4ec0c59b3151c (diff) |
fib: fix accessing empty dpo pool elements
Type: fix
Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com>
Change-Id: Iee88a2101ce42d7f1cdb65df532c349d14829e4c
Diffstat (limited to 'src/vnet/dpo/replicate_dpo.c')
-rw-r--r-- | src/vnet/dpo/replicate_dpo.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/dpo/replicate_dpo.c b/src/vnet/dpo/replicate_dpo.c index 998a729dcd2..cd753dcd35b 100644 --- a/src/vnet/dpo/replicate_dpo.c +++ b/src/vnet/dpo/replicate_dpo.c @@ -687,7 +687,10 @@ replicate_show (vlib_main_t * vm, if (INDEX_INVALID != repi) { - vlib_cli_output (vm, "%U", format_replicate, repi, + if (pool_is_free_index (replicate_pool, repi)) + vlib_cli_output (vm, "no such index %d", repi); + else + vlib_cli_output (vm, "%U", format_replicate, repi, REPLICATE_FORMAT_DETAIL); } else |