aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsmbedtls
diff options
context:
space:
mode:
authorNiyaz Murshed <niyaz.murshed@arm.com>2024-02-14 00:12:32 +0000
committerFlorin Coras <florin.coras@gmail.com>2024-02-14 18:46:56 +0000
commit28aef29e01f786499d719ee40dbee77e7638a729 (patch)
tree8c4c10110004c188421c5b184d906b0274135bb3 /src/plugins/tlsmbedtls
parentf40a354daba1141a60dbb10b862672ea11270de8 (diff)
tls: fix compilation error
After changes done in https://gerrit.fd.io/r/c/vpp/+/40281 , mbedtls plugin is failing to build if enabled. Discussion https://lists.fd.io/g/vpp-dev/topic/104344802#24060 Type: fix Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com> Change-Id: Iee58b69301ac64f058bca0a7f7a0dedd2def4b35
Diffstat (limited to 'src/plugins/tlsmbedtls')
-rw-r--r--src/plugins/tlsmbedtls/tls_mbedtls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/tlsmbedtls/tls_mbedtls.c b/src/plugins/tlsmbedtls/tls_mbedtls.c
index 928b31b4a7f..ca454199edc 100644
--- a/src/plugins/tlsmbedtls/tls_mbedtls.c
+++ b/src/plugins/tlsmbedtls/tls_mbedtls.c
@@ -91,7 +91,8 @@ mbedtls_ctx_free (tls_ctx_t * ctx)
{
mbedtls_ctx_t *mc = (mbedtls_ctx_t *) ctx;
- if (mc->ssl.state == MBEDTLS_SSL_HANDSHAKE_OVER && !ctx->is_passive_close)
+ if (mc->ssl.state == MBEDTLS_SSL_HANDSHAKE_OVER &&
+ !(ctx->flags & TLS_CONN_F_PASSIVE_CLOSE))
mbedtls_ssl_close_notify (&mc->ssl);
if (mc->ssl.conf->endpoint == MBEDTLS_SSL_IS_SERVER)
{