tls: set app closed flag in framework 82/40282/3
authorFlorin Coras <fcoras@cisco.com>
Thu, 1 Feb 2024 00:18:17 +0000 (16:18 -0800)
committerFlorin Coras <fcoras@cisco.com>
Thu, 1 Feb 2024 01:08:18 +0000 (17:08 -0800)
Set the flag in tls framework as opposed to tls engines. This is similar
to passive close.

Type: improvement

Change-Id: I0c2a774b1ef9d7ec6ba74daf1678ea449815184f
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/plugins/tlsopenssl/tls_openssl.c
src/vnet/tls/tls.c

index ee42536..6c5f6cd 100644 (file)
@@ -1071,8 +1071,6 @@ openssl_app_close (tls_ctx_t * ctx)
   if (BIO_ctrl_pending (oc->rbio) <= 0
       && !svm_fifo_max_dequeue_cons (app_session->tx_fifo))
     openssl_confirm_app_close (ctx);
-  else
-    ctx->flags |= TLS_CONN_F_APP_CLOSED;
   return 0;
 }
 
index db5d1c6..30aafe0 100644 (file)
@@ -845,6 +845,7 @@ tls_disconnect (u32 ctx_handle, u32 thread_index)
   TLS_DBG (1, "Disconnecting %x", ctx_handle);
 
   ctx = tls_ctx_get (ctx_handle);
+  ctx->flags |= TLS_CONN_F_APP_CLOSED;
   tls_ctx_app_close (ctx);
 }