X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fnat.c;fp=src%2Fplugins%2Fnat%2Fnat.c;h=eeaa443bfe48f3858a98c8f77bb63c9488012894;hb=18f1e41d9c64188043f2b3fb1473d73242264a60;hp=e02a11a604f242e37c2efba1f37c7ac162add893;hpb=6cbb111086a9fd74330d95511bc551128e1539ef;p=vpp.git 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