nat: add/del ed_ext_ports only if the table is instantiated
Add a suitable ASSERT in the bihash template in case this happens again.
Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib370d4238f6bae2995bc30fd17fad5c41053c3d1
diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c
index f7d8807..47e9bd0 100644
--- a/src/vppinfra/bihash_template.c
+++ b/src/vppinfra/bihash_template.c
@@ -568,6 +568,9 @@
BV (clib_bihash_instantiate) (h);
BV (clib_bihash_alloc_unlock) (h);
}
+#else
+ /* Debug image: make sure the table has been instantiated */
+ ASSERT (h->instantiated != 0);
#endif
b = BV (clib_bihash_get_bucket) (h, hash);