summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat_api.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-05-04 09:56:58 +0000
committerOle Trøan <otroan@employees.org>2020-05-13 11:39:30 +0000
commita3a830484fa6b6487f7f3d991a52cb6b090a8be8 (patch)
tree3b833401c46da712228b0c1194b9f6c3b80b0ffa /src/plugins/nat/nat_api.c
parentbc752e432ff3e252f6e1a3f0372c9532f14909cd (diff)
nat: fix LRU blocked by inactive session
This fixes a situation where long-lived inactive session blocks LRU list. Solution is to have multiple LRU lists based on session type. This helps because session timeout is same for all sessions of same type. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I5e54b2aab73b23911d6518d42e8c3f166c69a38c
Diffstat (limited to 'src/plugins/nat/nat_api.c')
-rw-r--r--src/plugins/nat/nat_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/nat/nat_api.c b/src/plugins/nat/nat_api.c
index 74f24d85cf8..37af77d11c1 100644
--- a/src/plugins/nat/nat_api.c
+++ b/src/plugins/nat/nat_api.c
@@ -31,6 +31,7 @@
#include <nat/nat_msg_enum.h>
#include <vnet/fib/fib_table.h>
#include <vnet/ip/ip_types_api.h>
+#include <nat/nat44/ed_inlines.h>
#define vl_api_nat44_add_del_lb_static_mapping_t_endian vl_noop_handler
#define vl_api_nat44_nat44_lb_static_mapping_details_t_endian vl_noop_handler
@@ -2058,7 +2059,7 @@ static void
{
s = pool_elt_at_index(tsm->sessions, ses_index[0]);
nat_free_session_data (sm, s, tsm - sm->per_thread_data, 0);
- nat44_ed_delete_session (sm, s, tsm - sm->per_thread_data, 1);
+ nat_ed_session_delete (sm, s, tsm - sm->per_thread_data, 1);
}
}else{
vec_foreach (ses_index, ses_to_be_removed)