summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/bihash_template.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-04-23 16:56:15 -0400
committerDave Barach <dave@barachs.net>2020-04-23 16:56:51 -0400
commita90ba644b2c5463b89a91d019b3c22780242acc3 (patch)
treec5159f64b36fa7e1d052a6e76bb4917c0e65343d /src/vppinfra/bihash_template.c
parent843ea7c3e356b6e9353f9f275976f2fee23beeac (diff)
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
Diffstat (limited to 'src/vppinfra/bihash_template.c')
-rw-r--r--src/vppinfra/bihash_template.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c
index f7d88073418..47e9bd0113d 100644
--- a/src/vppinfra/bihash_template.c
+++ b/src/vppinfra/bihash_template.c
@@ -568,6 +568,9 @@ static_always_inline int BV (clib_bihash_add_del_inline_with_hash)
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);