From 0bfce6b7243af63c74823c78a9c98377079efec7 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 5 Apr 2024 14:50:10 -0700 Subject: tls: fix session state update on accept Only set state to ready if session is not already closing. Type: fix Change-Id: Ic95667f43ed09d693f1cf7c9f1c16f7f995ea2d8 Signed-off-by: Florin Coras --- src/vnet/tls/tls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/vnet') diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c index 6129b09207b..5f00e6e302d 100644 --- a/src/vnet/tls/tls.c +++ b/src/vnet/tls/tls.c @@ -501,7 +501,6 @@ tls_session_accept_callback (session_t *ts) ctx->c_s_index = SESSION_INVALID_INDEX; ctx->c_thread_index = ts->thread_index; ctx->tls_ctx_handle = ctx_handle; - ts->session_state = SESSION_STATE_READY; ts->opaque = ctx_handle; ctx->tls_session_handle = session_handle (ts); ctx->listener_ctx_index = tls_listener->opaque; @@ -518,6 +517,9 @@ tls_session_accept_callback (session_t *ts) tls_disconnect_transport (ctx); } + if (ts->session_state < SESSION_STATE_READY) + ts->session_state = SESSION_STATE_READY; + return 0; } -- cgit 1.2.3-korg