From c9fb987a9d571db38e3c05d37a4886c63b4820a6 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Sun, 19 Mar 2023 22:03:57 -0700 Subject: session: cleanup ho lookup table on close Make sure half-open table is cleaned up on close and cleanup of half-open. Type: fix Signed-off-by: Florin Coras Change-Id: Id7ad177f364d6395f7379dc927e449a40547510e --- src/vnet/tcp/tcp.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/vnet/tcp') diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index d0d8158ef00..977eda3bc65 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -489,6 +489,14 @@ tcp_session_reset (u32 conn_index, u32 thread_index) { tcp_connection_t *tc; tc = tcp_connection_get (conn_index, thread_index); + + /* For half-opens just cleanup */ + if (tc->state == TCP_STATE_SYN_SENT) + { + tcp_connection_cleanup (tc); + return; + } + tcp_send_reset (tc); tcp_connection_timers_reset (tc); tcp_cong_recovery_off (tc); -- cgit 1.2.3-korg