aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tls/tls.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-04-13 06:39:07 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-04-16 07:33:57 +0000
commit5c9083d52646153bdc917a7ae37da696d864ad1c (patch)
treeb28635fbfb3d443597526bd67625dce007d23186 /src/vnet/tls/tls.c
parente8fa6209de1bf4f89cd57fcc09dfdc6086b92df9 (diff)
session: use generic session pool for listeners
Change-Id: I825f3822910a6ee368b9004e39ca16ac6833e30c Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tls/tls.c')
-rw-r--r--src/vnet/tls/tls.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index d7dcb6de8f4..492b3cc7a2a 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -384,8 +384,7 @@ tls_session_accept_callback (stream_session_t * tls_session)
tls_ctx_t *lctx, *ctx;
u32 ctx_handle;
- tls_listener = listen_session_get (tls_session->session_type,
- tls_session->listener_index);
+ tls_listener = listen_session_get (tls_session->listener_index);
lctx = tls_listener_ctx_get (tls_listener->opaque);
ctx_handle = tls_ctx_alloc (lctx->tls_ctx_engine);
@@ -557,7 +556,6 @@ tls_start_listen (u32 app_listener_index, transport_endpoint_t * tep)
stream_session_t *tls_listener;
tls_ctx_t *lctx;
u32 lctx_index;
- session_type_t st;
stream_session_t *app_listener;
tls_engine_type_t engine_type;
@@ -581,8 +579,7 @@ tls_start_listen (u32 app_listener_index, transport_endpoint_t * tep)
tls_listener = listen_session_get_from_handle (tls_handle);
tls_listener->opaque = lctx_index;
- st = session_type_from_proto_and_ip (TRANSPORT_PROTO_TLS, sep->is_ip4);
- app_listener = listen_session_get (st, app_listener_index);
+ app_listener = listen_session_get (app_listener_index);
lctx = tls_listener_ctx_get (lctx_index);
lctx->parent_app_index = sep->app_index;
@@ -668,10 +665,10 @@ format_tls_listener (u8 * s, va_list * args)
{
u32 tc_index = va_arg (*args, u32);
tls_ctx_t *ctx = tls_listener_ctx_get (tc_index);
- u32 listener_index, type;
+ u32 listener_index, thread_index;
- listen_session_parse_handle (ctx->tls_session_handle, &type,
- &listener_index);
+ listen_session_parse_handle (ctx->tls_session_handle, &listener_index,
+ &thread_index);
return format (s, "[TLS] listener app %u child %u", ctx->parent_app_index,
listener_index);
}