summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/nat.c')
-rw-r--r--src/plugins/nat/nat.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index e02a11a604f..eeaa443bfe4 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -4388,16 +4388,13 @@ nat44_sessions_clear ()
/* *INDENT-OFF* */
vec_foreach (tsm, sm->per_thread_data)
{
- u32 ti;
-
nat44_db_free (tsm);
nat44_db_init (tsm);
-
- ti = tsm->snat_thread_index;
- vlib_set_simple_counter (&sm->total_users, ti, 0, 0);
- vlib_set_simple_counter (&sm->total_sessions, ti, 0, 0);
}
/* *INDENT-ON* */
+
+ vlib_zero_simple_counter (&sm->total_users, 0);
+ vlib_zero_simple_counter (&sm->total_sessions, 0);
}
static void