summaryrefslogtreecommitdiffstats
path: root/src/vnet/tls
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-10-06 19:06:35 -0700
committerDave Barach <vpp@barachs.net>2023-10-08 00:10:52 +0000
commita3d55df1e91a7df4ad4c0e1b639ba12a1ed04c79 (patch)
tree08d44b2850f0b7fdb8e5cb53da55172fc9f71a96 /src/vnet/tls
parent3843d0dd03a3ebbdb5d13b54e1b871a8ea72498c (diff)
tls: report error if connected cannot be initialized
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I987ac6b461b473836917bce6ce0d4ac109cc8ddb
Diffstat (limited to 'src/vnet/tls')
-rw-r--r--src/vnet/tls/tls.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index b3cec80c83a..aca8c9f16a3 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -227,7 +227,12 @@ tls_notify_app_connected (tls_ctx_t * ctx, session_error_t err)
app_session->opaque = ctx->parent_app_api_context;
if ((err = app_worker_init_connected (app_wrk, app_session)))
- goto failed;
+ {
+ app_worker_connect_notify (app_wrk, 0, err, ctx->parent_app_api_context);
+ ctx->no_app_session = 1;
+ session_free (app_session);
+ return -1;
+ }
app_session->session_state = SESSION_STATE_READY;
parent_app_api_ctx = ctx->parent_app_api_context;
@@ -244,9 +249,6 @@ tls_notify_app_connected (tls_ctx_t * ctx, session_error_t err)
return 0;
-failed:
- ctx->no_app_session = 1;
- tls_disconnect (ctx->tls_ctx_handle, vlib_get_thread_index ());
send_reply:
return app_worker_connect_notify (app_wrk, 0, err,
ctx->parent_app_api_context);