summaryrefslogtreecommitdiffhomepage
path: root/src/stream
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2020-10-01 10:04:35 +0300
committerVladimir Homutov <vl@nginx.com>2020-10-01 10:04:35 +0300
commit0f843cfb74dd4dab7bff4d9a0f7e73b8b8cb61f0 (patch)
tree83f084a7d73a8dc5fc7183d7946fb548f405aeb5 /src/stream
parentf797a8a5b5a2012b0cae9745f05386b628365cb7 (diff)
downloadnginx-0f843cfb74dd4dab7bff4d9a0f7e73b8b8cb61f0.tar.gz
nginx-0f843cfb74dd4dab7bff4d9a0f7e73b8b8cb61f0.tar.bz2
QUIC: moved ssl configuration pointer to quic configuration.
The ssl configuration is obtained at config time and saved for future use.
Diffstat (limited to 'src/stream')
-rw-r--r--src/stream/ngx_stream_handler.c8
-rw-r--r--src/stream/ngx_stream_quic_module.c7
2 files changed, 8 insertions, 7 deletions
diff --git a/src/stream/ngx_stream_handler.c b/src/stream/ngx_stream_handler.c
index 2b0848a67..33f7bc191 100644
--- a/src/stream/ngx_stream_handler.c
+++ b/src/stream/ngx_stream_handler.c
@@ -118,18 +118,14 @@ ngx_stream_init_connection(ngx_connection_t *c)
#if (NGX_STREAM_QUIC)
if (addr_conf->quic) {
- ngx_quic_conf_t *qcf;
- ngx_stream_ssl_conf_t *scf;
+ ngx_quic_conf_t *qcf;
if (c->qs == NULL) {
c->log->connection = c->number;
qcf = ngx_stream_get_module_srv_conf(addr_conf->ctx,
ngx_stream_quic_module);
- scf = ngx_stream_get_module_srv_conf(addr_conf->ctx,
- ngx_stream_ssl_module);
-
- ngx_quic_run(c, &scf->ssl, qcf);
+ ngx_quic_run(c, qcf);
return;
}
}
diff --git a/src/stream/ngx_stream_quic_module.c b/src/stream/ngx_stream_quic_module.c
index 362855f1a..ba601a030 100644
--- a/src/stream/ngx_stream_quic_module.c
+++ b/src/stream/ngx_stream_quic_module.c
@@ -28,7 +28,7 @@ static ngx_conf_post_t ngx_stream_quic_max_udp_payload_size_post =
{ ngx_stream_quic_max_udp_payload_size };
static ngx_conf_num_bounds_t ngx_stream_quic_ack_delay_exponent_bounds =
{ ngx_conf_check_num_bounds, 0, 20 };
-static ngx_conf_num_bounds_t
+static ngx_conf_num_bounds_t
ngx_stream_quic_active_connection_id_limit_bounds =
{ ngx_conf_check_num_bounds, 2, -1 };
@@ -251,6 +251,8 @@ ngx_stream_quic_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_quic_conf_t *prev = parent;
ngx_quic_conf_t *conf = child;
+ ngx_stream_ssl_conf_t *scf;
+
ngx_conf_merge_msec_value(conf->tp.max_idle_timeout,
prev->tp.max_idle_timeout, 60000);
@@ -302,6 +304,9 @@ ngx_stream_quic_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
}
}
+ scf = ngx_stream_conf_get_module_srv_conf(cf, ngx_stream_ssl_module);
+ conf->ssl = &scf->ssl;
+
return NGX_CONF_OK;
}