diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/bier/bier_disp_entry.c | 11 | ||||
-rw-r--r-- | src/vnet/bier/bier_disp_table.c | 11 | ||||
-rw-r--r-- | src/vnet/bier/bier_imp.c | 11 |
3 files changed, 27 insertions, 6 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); } 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); } diff --git a/src/vnet/bier/bier_imp.c b/src/vnet/bier/bier_imp.c index bd934b77f16..0c87d1724b4 100644 --- a/src/vnet/bier/bier_imp.c +++ b/src/vnet/bier/bier_imp.c @@ -275,8 +275,15 @@ show_bier_imp (vlib_main_t * vm, } else { - vlib_cli_output(vm, "%U", format_bier_imp, bii, 1, - BIER_SHOW_DETAIL); + if (pool_is_free_index(bier_imp_pool, bii)) + { + vlib_cli_output(vm, "No such BIER imposition: %d", bii); + } + else + { + vlib_cli_output(vm, "%U", format_bier_imp, bii, 1, + BIER_SHOW_DETAIL); + } } return (NULL); } |