From: Florin Coras Date: Tue, 20 Feb 2024 19:24:54 +0000 (-0800) Subject: tls: fix transport endpoint get X-Git-Tag: v24.10-rc0~219 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F70%2F40370%2F3;p=vpp.git tls: fix transport endpoint get Type: fix Signed-off-by: Florin Coras Change-Id: Idb8cc576168ce0ffa8f06be1acef4be4b3b29433 --- 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