summaryrefslogtreecommitdiffstats
path: root/src/vnet/bier/bier_disp_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bier/bier_disp_table.c')
-rw-r--r--src/vnet/bier/bier_disp_table.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vnet/bier/bier_disp_table.c b/src/vnet/bier/bier_disp_table.c
index c663286efcb..68edb088400 100644
--- a/src/vnet/bier/bier_disp_table.c
+++ b/src/vnet/bier/bier_disp_table.c
@@ -385,8 +385,15 @@ show_bier_disp_table (vlib_main_t * vm,
}
else
{
- vlib_cli_output(vm, "%U", format_bier_disp_table, bdti, 0,
- BIER_SHOW_DETAIL);
+ if (pool_is_free_index(bier_disp_table_pool, bdti))
+ {
+ vlib_cli_output(vm, "No such BIER disp table: %d", bdti);
+ }
+ else
+ {
+ vlib_cli_output(vm, "%U", format_bier_disp_table, bdti, 0,
+ BIER_SHOW_DETAIL);
+ }
}
return (NULL);
}