summaryrefslogtreecommitdiffstats
path: root/src/vnet/tls
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-01-22 18:06:41 -0800
committerDave Barach <vpp@barachs.net>2024-01-23 16:32:08 +0000
commitfad689eeba861f080596e305f2b3e5d0bfaa046d (patch)
treedde73a4e9531840e42758b4beea59bc1d0c66df2 /src/vnet/tls
parent77680ae56f9c8854f5ed4290b971a43cf0fa8690 (diff)
tls: set flag whenever app session is freed
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3d44ff851da00573343e15712284af3b9c3912e3
Diffstat (limited to 'src/vnet/tls')
-rw-r--r--src/vnet/tls/tls.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index 6882f806231..7c84f15e9e0 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -216,6 +216,7 @@ tls_notify_app_accept (tls_ctx_t * ctx)
{
TLS_DBG (1, "failed to allocate fifos");
session_free (app_session);
+ ctx->no_app_session = 1;
return rv;
}
ctx->app_session_handle = session_handle (app_session);
@@ -455,12 +456,15 @@ tls_session_reset_callback (session_t * s)
tls_disconnect_transport (ctx);
}
else
- if ((app_session =
- session_get_if_valid (ctx->c_s_index, ctx->c_thread_index)))
{
- session_free (app_session);
- ctx->c_s_index = SESSION_INVALID_INDEX;
- tls_disconnect_transport (ctx);
+ app_session = session_get_if_valid (ctx->c_s_index, ctx->c_thread_index);
+ if (app_session)
+ {
+ session_free (app_session);
+ ctx->c_s_index = SESSION_INVALID_INDEX;
+ ctx->no_app_session = 1;
+ tls_disconnect_transport (ctx);
+ }
}
}