From: Florin Coras Date: Fri, 17 Feb 2023 02:59:38 +0000 (-0800) Subject: tcp: allow syns in closed state X-Git-Tag: v23.10-rc0~167 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=3ffc77da2b750a43c1a254612a5856277f749e68;p=vpp.git tcp: allow syns in closed state Type: improvement Signed-off-by: Florin Coras Change-Id: If223096cf912c1748ae417b40585a9bea5d9d9a9 --- diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 9e2ff190d64..32de187eef2 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -2628,7 +2628,8 @@ tcp46_listen_inline (vlib_main_t *vm, vlib_node_runtime_t *node, { lc = tcp_listener_get (vnet_buffer (b[0])->tcp.connection_index); } - else /* We are in TimeWait state*/ + /* Probably we are in time-wait or closed state */ + else { tcp_connection_t *tc; tc = tcp_connection_get (vnet_buffer (b[0])->tcp.connection_index, @@ -3350,7 +3351,7 @@ do { \ _(CLOSED, TCP_FLAG_RST | TCP_FLAG_ACK, TCP_INPUT_NEXT_DROP, TCP_ERROR_CONNECTION_CLOSED); _(CLOSED, TCP_FLAG_ACK, TCP_INPUT_NEXT_RESET, TCP_ERROR_CONNECTION_CLOSED); - _(CLOSED, TCP_FLAG_SYN, TCP_INPUT_NEXT_RESET, TCP_ERROR_CONNECTION_CLOSED); + _ (CLOSED, TCP_FLAG_SYN, TCP_INPUT_NEXT_LISTEN, TCP_ERROR_NONE); _(CLOSED, TCP_FLAG_FIN | TCP_FLAG_ACK, TCP_INPUT_NEXT_RESET, TCP_ERROR_CONNECTION_CLOSED); #undef _