aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-10 19:34:28 +0000
committerJohn Lo <loj@cisco.com>2020-03-10 22:09:21 +0000
commit9f4db3cddf9931ef97ef0ea8f9dac1b63199407c (patch)
treeb7a3ef8df425b70cbb6b7bfd7b09683659556285
parent66441c4c6fa1fc32f9df510c7665886c6eb50189 (diff)
tcp: protect against forced cleanups
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0c3b847044d522f55dfd8262afa7c161d5bd5dd3
-rw-r--r--src/vnet/tcp/tcp.c2
1 files changed, 2 insertions, 0 deletions
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);
}