aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-04-05 14:50:10 -0700
committerDave Barach <vpp@barachs.net>2024-04-08 16:10:03 +0000
commit0bfce6b7243af63c74823c78a9c98377079efec7 (patch)
treec18706cd8b1bb92d5920c50b128cf172d0a688de /src/vnet
parent3150250bc911b669b80dd4fe11c099430ceab172 (diff)
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 <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/tls/tls.c4
1 files changed, 3 insertions, 1 deletions
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;
}