aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Loeliger <jdl@netgate.com>2019-02-21 13:29:51 -0600
committerOle Trøan <otroan@employees.org>2019-02-26 09:29:45 +0000
commit9338fc644da4e1d9d9ac9f1e3886f555918026f8 (patch)
tree494ae5d609a4e3b22bb884d80d8dd7e7d50cca22
parent49ff6d1e16f24272eafe4044186aae32f0e7054d (diff)
Remove fake MAP domain 0 entry.
Problematic: - It didn't have its counters initialized, so vpp crashed during a "show map stat" - Not all the tests for "are there any domains" actually accounted for the fake entry at pool slot 0. - Dump details happily returned its bogus entry. Change-Id: I57aaa9f63917686334fd4a9fa7bc80044bf1718c Signed-off-by: Jon Loeliger <jdl@netgate.com>
-rw-r--r--src/plugins/map/map.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c
index 47af8947fb9..2f13336b568 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) <= 1)
+ if (pool_elts (mm->domains) == 0)
{
vlib_cli_output (vm, "No MAP domains are configured...");
return 0;
@@ -2245,12 +2245,6 @@ map_init (vlib_main_t * vm)
fib_node_register_type (FIB_NODE_TYPE_MAP_E, &map_vft);
#endif
- /* Create empty domain that's used in case of error */
- map_domain_t *d;
- pool_get_aligned (mm->domains, d, CLIB_CACHE_LINE_BYTES);
- memset (d, 0, sizeof (*d));
- d->ip6_src_len = 64;
-
/* LPM lookup tables */
mm->ip4_prefix_tbl = lpm_table_init (LPM_TYPE_KEY32);
mm->ip6_prefix_tbl = lpm_table_init (LPM_TYPE_KEY128);