From 9f4db3cddf9931ef97ef0ea8f9dac1b63199407c Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 10 Mar 2020 19:34:28 +0000 Subject: [PATCH] tcp: protect against forced cleanups Type: fix Signed-off-by: Florin Coras Change-Id: I0c3b847044d522f55dfd8262afa7c161d5bd5dd3 --- src/vnet/tcp/tcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index 2ada8b8f7dd..7712ade4416 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -1467,6 +1467,8 @@ tcp_handle_cleanups (tcp_worker_ctx_t * wrk, clib_time_type_t now) break; clib_fifo_sub2 (wrk->pending_cleanups, req); tc = tcp_connection_get (req->connection_index, thread_index); + if (PREDICT_FALSE (!tc)) + continue; session_transport_delete_notify (&tc->connection); tcp_connection_cleanup (tc); } -- 2.16.6