diff options
author | Florin Coras <fcoras@cisco.com> | 2019-10-11 08:00:43 -0700 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-10-29 09:48:30 +0000 |
commit | e68fe9c5163a74f39e400dc44c711677ddb01466 (patch) | |
tree | 38bc3382373b652c8d3c304835dc25fe078899cf /src | |
parent | cdb11ea3299ef953066b159fd34f054c2f6f2f00 (diff) |
tls: allow disconnects from main thread
Type: fix
Use api with explicit thread index to retrieve tls contex on close.
Change-Id: Ibdc4338747300b7fc8f91ef3e10bcd48ce7ae366
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 6faac1622e0d5352da987c73a6f3f1ec55896116)
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/tls/tls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c index 4fff72f1cda..67807d36cc7 100644 --- a/src/vnet/tls/tls.c +++ b/src/vnet/tls/tls.c @@ -386,7 +386,10 @@ tls_session_disconnect_callback (session_t * tls_session) TLS_DBG (1, "TCP disconnecting handle %x session %u", tls_session->opaque, tls_session->session_index); - ctx = tls_ctx_get (tls_session->opaque); + ASSERT (tls_session->thread_index == vlib_get_thread_index () + || vlib_thread_is_main_w_barrier ()); + + ctx = tls_ctx_get_w_thread (tls_session->opaque, tls_session->thread_index); ctx->is_passive_close = 1; tls_ctx_transport_close (ctx); } |