aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tls
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-02-20 11:24:54 -0800
committerFlorin Coras <fcoras@cisco.com>2024-02-20 11:27:03 -0800
commit8074fc6209c97eba0d4d5e8391cae0f5fb61a5c4 (patch)
treece1f11f4e04e843663dc5fa93a17e4630c9801d7 /src/vnet/tls
parent7217dcdb54c8d66cec28ca71697b808099a7bd85 (diff)
tls: fix transport endpoint get
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idb8cc576168ce0ffa8f06be1acef4be4b3b29433
Diffstat (limited to 'src/vnet/tls')
-rw-r--r--src/vnet/tls/tls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index 9694b27a79e..1e7194c5271 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -1167,10 +1167,11 @@ tls_transport_endpoint_get (u32 ctx_handle, u32 thread_index,
transport_endpoint_t * tep, u8 is_lcl)
{
tls_ctx_t *ctx = tls_ctx_get_w_thread (ctx_handle, thread_index);
- session_t *tcp_session;
+ session_t *ts;
- tcp_session = session_get_from_handle (ctx->tls_session_handle);
- session_get_endpoint (tcp_session, tep, is_lcl);
+ ts = session_get_from_handle (ctx->tls_session_handle);
+ if (ts && ts->session_state < SESSION_STATE_TRANSPORT_DELETED)
+ session_get_endpoint (ts, tep, is_lcl);
}
static void