summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-03-24 12:20:46 +0100
committerOle Trøan <otroan@employees.org>2020-03-25 08:19:39 +0000
commit4cfb0bf1b87d7a89898c20dfb9b145876c08fe02 (patch)
tree098fcb1e9d22ce75dd40ca66d9248649d086681b /src/plugins/nat/nat.c
parentb1bd8760ce9b1416c8a7f12e411cfcf60de2929f (diff)
nat: fix error counters
Type: fix Change-Id: I021b1427362f4bdba1c0ebc9863c9143dd6b3cb7 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.c')
-rwxr-xr-xsrc/plugins/nat/nat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index bc2f8c0e1fe..1f63237fb45 100755
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -490,7 +490,11 @@ nat_user_get_or_create (snat_main_t * sm, ip4_address_t * addr, u32 fib_index,
/* add user */
if (clib_bihash_add_del_8_8 (&tsm->user_hash, &kv, 1))
- nat_elog_warn ("user_hash keay add failed");
+ {
+ nat_elog_warn ("user_hash key add failed");
+ nat44_delete_user_with_no_session (sm, u, thread_index);
+ return NULL;
+ }
vlib_set_simple_counter (&sm->total_users, thread_index, 0,
pool_elts (tsm->users));