tls: init connection for prealloced app sessions 85/39585/2
authorFlorin Coras <fcoras@cisco.com>
Tue, 26 Sep 2023 02:50:48 +0000 (19:50 -0700)
committerDave Barach <vpp@barachs.net>
Tue, 26 Sep 2023 22:06:09 +0000 (22:06 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icd62dc110e3a73b24372f3a5162f8008b7edee9f

src/vnet/tls/tls.c

index 1461d0c..6905afc 100644 (file)
@@ -486,6 +486,9 @@ tls_session_accept_callback (session_t * tls_session)
    * on tls_session rx and potentially invalidating the session pool */
   app_session = session_alloc (ctx->c_thread_index);
   app_session->session_state = SESSION_STATE_CREATED;
+  app_session->session_type =
+    session_type_from_proto_and_ip (TRANSPORT_PROTO_TLS, ctx->tcp_is_ip4);
+  app_session->connection_index = ctx->tls_ctx_handle;
   ctx->c_s_index = app_session->session_index;
 
   TLS_DBG (1, "Accept on listener %u new connection [%u]%x",