aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-03-22 14:47:16 -0700
committerDave Barach <vpp@barachs.net>2024-03-24 00:03:49 +0000
commita8d266a7a4bf1188739dcd6d3ddcc8173282d95d (patch)
treeb0c621e9a7166a519fc36eec6f5030ed410abcbb /src/vnet
parent5f22f7d11cc5af47c3d1188f0c890532fc1ed98d (diff)
tls: pass session state to engine on client init
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibe218a922ab656b8362e3c085193cb848783c255
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 3096dd53106..996c20f2829 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -582,7 +582,6 @@ tls_session_connected_cb (u32 tls_app_index, u32 ho_ctx_index,
ctx->tls_session_handle = session_handle (tls_session);
tls_session->opaque = ctx_handle;
- tls_session->session_state = SESSION_STATE_READY;
if (tls_ctx_init_client (ctx))
{
@@ -590,6 +589,9 @@ tls_session_connected_cb (u32 tls_app_index, u32 ho_ctx_index,
tls_disconnect_transport (ctx);
}
+ if (tls_session->session_state < SESSION_STATE_READY)
+ tls_session->session_state = SESSION_STATE_READY;
+
return 0;
}