summaryrefslogtreecommitdiffstats
path: root/src/vnet/bier/bier_disp_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bier/bier_disp_entry.c')
-rw-r--r--src/vnet/bier/bier_disp_entry.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vnet/bier/bier_disp_entry.c b/src/vnet/bier/bier_disp_entry.c
index 2fe2e4ab909..2df8314dc09 100644
--- a/src/vnet/bier/bier_disp_entry.c
+++ b/src/vnet/bier/bier_disp_entry.c
@@ -375,8 +375,15 @@ show_bier_disp_entry (vlib_main_t * vm,
}
else
{
- vlib_cli_output(vm, "%U", format_bier_disp_entry, bdei, 1,
- BIER_SHOW_DETAIL);
+ if (pool_is_free_index(bier_disp_entry_pool, bdei))
+ {
+ vlib_cli_output(vm, "No such BIER disp entry: %d", bdei);
+ }
+ else
+ {
+ vlib_cli_output(vm, "%U", format_bier_disp_entry, bdei, 1,
+ BIER_SHOW_DETAIL);
+ }
}
return (NULL);
}