summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-02-17 13:37:20 +0000
committerOle Trøan <otroan@employees.org>2020-02-20 08:49:28 +0000
commit8a10c7351b35ab8405c2a9b030dba74a4da28f30 (patch)
tree561ee5a55a28d641892052f0d789d786edbc9b58 /src/plugins/nat/nat.c
parent855938073f4f0c377488652f4204d3869151b010 (diff)
nat: avoid running pointless session cleanups
Save the next session timeout when sweeping sessions for cleanup so that we can avoid unnecessary runs of the sweeping algorithm. Type: fix Change-Id: I736d00f2dfe242af10f963fbe34b11128f8b0613 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.c')
-rwxr-xr-xsrc/plugins/nat/nat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 9f516586877..07147083e52 100755
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -3935,6 +3935,7 @@ snat_config (vlib_main_t * vm, unformat_input_t * input)
/* *INDENT-OFF* */
vec_foreach (tsm, sm->per_thread_data)
{
+ tsm->min_session_timeout = 0;
if (sm->endpoint_dependent)
{
clib_bihash_init_16_8 (&tsm->in2out_ed, "in2out-ed",