tls: free app session if connect notify refused 79/36079/2
authorFlorin Coras <fcoras@cisco.com>
Wed, 4 May 2022 19:02:56 +0000 (12:02 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Wed, 4 May 2022 21:05:11 +0000 (21:05 +0000)
Type: fix

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

src/vnet/tls/tls.c

index 3a781eb..c168995 100644 (file)
@@ -265,8 +265,8 @@ tls_notify_app_connected (tls_ctx_t * ctx, session_error_t err)
                                 parent_app_api_ctx))
     {
       TLS_DBG (1, "failed to notify app");
-      app_session->session_state = SESSION_STATE_CONNECTING;
-      tls_disconnect (ctx->tls_ctx_handle, vlib_get_thread_index ());
+      session_free (session_get (ctx->c_s_index, ctx->c_thread_index));
+      ctx->no_app_session = 1;
       return -1;
     }