diff options
author | Florin Coras <fcoras@cisco.com> | 2024-07-11 05:15:47 -0700 |
---|---|---|
committer | Dave Barach <vpp@barachs.net> | 2024-07-16 15:50:30 +0000 |
commit | 3a2cf84fa5d364f45dc354e23c3dd09b12cba9a8 (patch) | |
tree | 127cbbf8027ef38df92f491527d55fcc7a387a3b /src | |
parent | 2da273ace86764c5999ffd30e6e1ca5fcfd09f4b (diff) |
tls: track app owner of transport session
Allow other apps to own transport sessions for tls.
Type: improvement
Change-Id: Ida04cef1dc49acb7117cbed8657e26890bf43d2a
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/tls/tls.c | 4 | ||||
-rw-r--r-- | src/vnet/tls/tls.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c index 9bc9323732e..9ca3a91af29 100644 --- a/src/vnet/tls/tls.c +++ b/src/vnet/tls/tls.c @@ -28,7 +28,7 @@ tls_disconnect_transport (tls_ctx_t * ctx) { vnet_disconnect_args_t a = { .handle = ctx->tls_session_handle, - .app_index = tls_main.app_index, + .app_index = ctx->ts_app_index, }; if (vnet_disconnect_session (&a)) @@ -649,6 +649,7 @@ tls_connect (transport_endpoint_cfg_t * tep) ctx = tls_ctx_half_open_get (ctx_index); ctx->parent_app_wrk_index = sep->app_wrk_index; ctx->parent_app_api_context = sep->opaque; + ctx->ts_app_index = tm->app_index; ctx->tcp_is_ip4 = sep->is_ip4; ctx->tls_type = sep->transport_proto; ctx->ckpair_index = ccfg->ckpair_index; @@ -748,6 +749,7 @@ tls_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep) lctx = tls_listener_ctx_get (lctx_index); lctx->parent_app_wrk_index = sep->app_wrk_index; + lctx->ts_app_index = tm->app_index; lctx->tls_session_handle = tls_al_handle; lctx->app_session_handle = listen_session_get_handle (app_listener); lctx->tcp_is_ip4 = sep->is_ip4; diff --git a/src/vnet/tls/tls.h b/src/vnet/tls/tls.h index 38f4c4b8f81..30bcce005fb 100644 --- a/src/vnet/tls/tls.h +++ b/src/vnet/tls/tls.h @@ -102,6 +102,7 @@ typedef struct tls_ctx_ #define parent_app_api_context c_tls_ctx_id.parent_app_api_ctx #define migration_ctx c_tls_ctx_id.migrate_ctx + u32 ts_app_index; tls_conn_flags_t flags; u8 *srv_hostname; u32 evt_index; |