summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat64.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-08-23 00:33:35 -0700
committerOle Trøan <otroan@employees.org>2018-08-27 12:17:25 +0000
commit878c646aea9b9ccf68011ffd964694c43bbe5fdd (patch)
tree4acfaf8c3e35e2c2e334ae8495fdd52c49b5a791 /src/plugins/nat/nat64.c
parentd2dcd200fe2e94f6408155f6c38e7f570dbe1183 (diff)
NAT44: add support for session timeout (VPP-1272)
NAT44 (vanilla/simple and endpoint-dependent mode) now lazily delete expired sessions. When inserting to session lookup hash and bucket is full, expired session is overwritten. Change-Id: Ib1b34959f60f0ca4f5b13525b1d41dd2f992288d Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat64.c')
-rw-r--r--src/plugins/nat/nat64.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/plugins/nat/nat64.c b/src/plugins/nat/nat64.c
index 1ca5e369b98..04055af99bf 100644
--- a/src/plugins/nat/nat64.c
+++ b/src/plugins/nat/nat64.c
@@ -231,7 +231,6 @@ nat64_init (vlib_main_t * vm)
nm->icmp_timeout = SNAT_ICMP_TIMEOUT;
nm->tcp_trans_timeout = SNAT_TCP_TRANSITORY_TIMEOUT;
nm->tcp_est_timeout = SNAT_TCP_ESTABLISHED_TIMEOUT;
- nm->tcp_incoming_syn_timeout = SNAT_TCP_INCOMING_SYN;
nm->total_enabled_count = 0;
@@ -757,8 +756,6 @@ nat64_set_udp_timeout (u32 timeout)
if (timeout == 0)
nm->udp_timeout = SNAT_UDP_TIMEOUT;
- else if (timeout < SNAT_UDP_TIMEOUT_MIN)
- return VNET_API_ERROR_INVALID_VALUE;
else
nm->udp_timeout = timeout;
@@ -795,7 +792,7 @@ nat64_get_icmp_timeout (void)
}
int
-nat64_set_tcp_timeouts (u32 trans, u32 est, u32 incoming_syn)
+nat64_set_tcp_timeouts (u32 trans, u32 est)
{
nat64_main_t *nm = &nat64_main;
@@ -809,11 +806,6 @@ nat64_set_tcp_timeouts (u32 trans, u32 est, u32 incoming_syn)
else
nm->tcp_est_timeout = est;
- if (incoming_syn == 0)
- nm->tcp_incoming_syn_timeout = SNAT_TCP_INCOMING_SYN;
- else
- nm->tcp_incoming_syn_timeout = incoming_syn;
-
return 0;
}
@@ -833,14 +825,6 @@ nat64_get_tcp_est_timeout (void)
return nm->tcp_est_timeout;
}
-u32
-nat64_get_tcp_incoming_syn_timeout (void)
-{
- nat64_main_t *nm = &nat64_main;
-
- return nm->tcp_incoming_syn_timeout;
-}
-
void
nat64_session_reset_timeout (nat64_db_st_entry_t * ste, vlib_main_t * vm)
{