From: Ole Troan Date: Wed, 30 Jan 2019 18:01:49 +0000 (+0100) Subject: VPP-1543: show map stats crash when not configured. X-Git-Tag: v19.04-rc1~539 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=9bb20b310280a3c9604f9dd24fbb6757d7f9ca65;p=vpp.git VPP-1543: show map stats crash when not configured. Change-Id: I4c8bc3fb057d57339ce282a31b0bb70ad16dd03e Signed-off-by: Ole Troan --- diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c index 6b15ee1919e..47af8947fb9 100644 --- a/src/plugins/map/map.c +++ b/src/plugins/map/map.c @@ -1048,7 +1048,7 @@ show_map_stats_command_fn (vlib_main_t * vm, unformat_input_t * input, map_main_t *mm = &map_main; map_domain_t *d; int domains = 0, rules = 0, domaincount = 0, rulecount = 0; - if (pool_elts (mm->domains) == 0) + if (pool_elts (mm->domains) <= 1) { vlib_cli_output (vm, "No MAP domains are configured..."); return 0;