summaryrefslogtreecommitdiffstats
path: root/src/vnet/bier/bier_imp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bier/bier_imp.c')
-rw-r--r--src/vnet/bier/bier_imp.c11
1 files changed, 9 insertions, 2 deletions
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);
}