diff options
author | Florin Coras <fcoras@cisco.com> | 2024-11-10 15:45:47 -0500 |
---|---|---|
committer | Dave Barach <vpp@barachs.net> | 2024-11-11 17:58:38 +0000 |
commit | 27a901ece39c371eba0f11806d9fe54b0e8dc95c (patch) | |
tree | ec1b0f0b6a5eddd1197f785229288843df4180b6 /src | |
parent | 3ac40b94ce324df0db6c17add36fc4d82576193a (diff) |
tcp: handle multiple syns in time-wait
If multiple syns are received in one dispatch for the same time-wait
connection, the first removes the connection while subsequent packets
either lookup a nonexistent or an unrelated connection.
Avoid the former with a check.
Type: fix
Change-Id: Ia5f1b3bbd568566eaf36121206aa12363a15b418
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/tcp/tcp_input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 70b5d28e0cc..cd3e4b7700c 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -2551,7 +2551,7 @@ tcp46_listen_inline (vlib_main_t *vm, vlib_node_runtime_t *node, tcp_connection_t *tc; tc = tcp_connection_get (vnet_buffer (b[0])->tcp.connection_index, thread_index); - if (tc->state != TCP_STATE_TIME_WAIT) + if (!tc || tc->state != TCP_STATE_TIME_WAIT) { tcp_inc_counter (listen, TCP_ERROR_CREATE_EXISTS, 1); goto done; |