tls http srtp: fix session index for listeners 44/35344/3
authorFlorin Coras <fcoras@cisco.com>
Thu, 17 Feb 2022 01:12:01 +0000 (17:12 -0800)
committerDave Barach <openvpp@barachs.net>
Thu, 17 Feb 2022 19:07:30 +0000 (19:07 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If5e6d0e8c686ea93674d6201c38b3a4d1c4786a5

src/plugins/http/http.c
src/plugins/srtp/srtp.c
src/vnet/tls/tls.c

index d407d9d..868d0dd 100644 (file)
@@ -733,7 +733,7 @@ static u32
 http_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
 {
   vnet_listen_args_t _args = {}, *args = &_args;
-  session_t *tc_listener, *app_listener;
+  session_t *ts_listener, *app_listener;
   http_main_t *hm = &http_main;
   session_endpoint_cfg_t *sep;
   app_worker_t *app_wrk;
@@ -763,13 +763,14 @@ http_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
   /* Grab transport connection listener and link to http listener */
   lhc->h_tc_session_handle = args->handle;
   al = app_listener_get_w_handle (lhc->h_tc_session_handle);
-  tc_listener = app_listener_get_session (al);
-  tc_listener->opaque = lhc_index;
+  ts_listener = app_listener_get_session (al);
+  ts_listener->opaque = lhc_index;
 
   /* Grab application listener and link to http listener */
   app_listener = listen_session_get (app_listener_index);
   lhc->h_pa_wrk_index = sep->app_wrk_index;
   lhc->h_pa_session_handle = listen_session_get_handle (app_listener);
+  lhc->c_s_index = app_listener_index;
   lhc->c_flags |= TRANSPORT_CONNECTION_F_NO_LOOKUP;
 
   return lhc_index;
index 82d9b3d..c9987e8 100644 (file)
@@ -750,6 +750,7 @@ srtp_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
   lctx->srtp_session_handle = udp_al_handle;
   lctx->app_session_handle = listen_session_get_handle (app_listener);
   lctx->udp_is_ip4 = sep->is_ip4;
+  lctx->c_s_index = app_listener_index;
   lctx->c_flags |= TRANSPORT_CONNECTION_F_NO_LOOKUP;
 
   srtp_init_policy (lctx, (transport_endpt_cfg_srtp_t *) sep->ext_cfg->data);
index e201d47..ec5f670 100644 (file)
@@ -834,6 +834,7 @@ tls_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
   lctx->tls_ctx_engine = engine_type;
   lctx->tls_type = sep->transport_proto;
   lctx->ckpair_index = ccfg->ckpair_index;
+  lctx->c_s_index = app_listener_index;
   lctx->c_flags |= TRANSPORT_CONNECTION_F_NO_LOOKUP;
 
   if (tls_vfts[engine_type].ctx_start_listen (lctx))