aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/http/http.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-10-16 15:29:36 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-10-25 15:50:51 +0000
commit10c016c055c3900bf5a52f30a67f3aff20a37492 (patch)
tree194b8714c3e2b7b61d33d5ee6d9febc580069b40 /src/plugins/http/http.c
parent75f4960d12a37d0b6ad2cd003e2a10ddb2527db6 (diff)
session: support of multiple extended configs
This allow configuration for each transport protocol when combined, e.g. HTTPS=HTTP+TLS. Extended config of session endpoint config is now chunk of memory, which allow seamless integration with VCL, and internal representation is hidden behind APIs, which is better for future improvements. By default chunk is allocated to 512B if the app doesn't do so before. Type: improvement Change-Id: I323f19ec255eba31c58c06b8b83af45aab7f5bb1 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/http/http.c')
-rw-r--r--src/plugins/http/http.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/http/http.c b/src/plugins/http/http.c
index cec441d7fcb..6afb80d11c4 100644
--- a/src/plugins/http/http.c
+++ b/src/plugins/http/http.c
@@ -1876,11 +1876,12 @@ http_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
http_main_t *hm = &http_main;
session_endpoint_cfg_t *sep;
app_worker_t *app_wrk;
- transport_proto_t tp;
+ transport_proto_t tp = TRANSPORT_PROTO_TCP;
app_listener_t *al;
application_t *app;
http_conn_t *lhc;
u32 lhc_index;
+ transport_endpt_ext_cfg_t *ext_cfg;
sep = (session_endpoint_cfg_t *) tep;
@@ -1890,7 +1891,10 @@ http_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
args->app_index = hm->app_index;
args->sep_ext = *sep;
args->sep_ext.ns_index = app->ns_index;
- tp = sep->ext_cfg ? TRANSPORT_PROTO_TLS : TRANSPORT_PROTO_TCP;
+
+ ext_cfg = session_endpoint_get_ext_cfg (sep, TRANSPORT_ENDPT_EXT_CFG_CRYPTO);
+ if (ext_cfg)
+ tp = TRANSPORT_PROTO_TLS;
args->sep_ext.transport_proto = tp;
if (vnet_listen (args))