aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_quic_module.c
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2022-01-18 12:49:55 +0300
committerVladimir Homutov <vl@nginx.com>2022-01-18 12:49:55 +0300
commit1f97aa71ecaa75dfd646495a13534b10405b500c (patch)
treecce31e1e2566019fbd199dec9784a3bc597064a0 /src/stream/ngx_stream_quic_module.c
parent8a67a56091a04055edee4d551e78beacaf79c17a (diff)
downloadnginx-1f97aa71ecaa75dfd646495a13534b10405b500c.tar.gz
nginx-1f97aa71ecaa75dfd646495a13534b10405b500c.zip
QUIC: the "quic_active_connection_id_limit" directive.
The directive sets corresponding transport parameter and limits number of created client ids.
Diffstat (limited to 'src/stream/ngx_stream_quic_module.c')
-rw-r--r--src/stream/ngx_stream_quic_module.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_quic_module.c b/src/stream/ngx_stream_quic_module.c
index 34f1e18ef..0505df501 100644
--- a/src/stream/ngx_stream_quic_module.c
+++ b/src/stream/ngx_stream_quic_module.c
@@ -67,6 +67,13 @@ static ngx_command_t ngx_stream_quic_commands[] = {
0,
NULL },
+ { ngx_string("quic_active_connection_id_limit"),
+ NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_num_slot,
+ NGX_STREAM_SRV_CONF_OFFSET,
+ offsetof(ngx_quic_conf_t, active_connection_id_limit),
+ NULL },
+
ngx_null_command
};
@@ -176,6 +183,8 @@ ngx_stream_quic_create_srv_conf(ngx_conf_t *cf)
conf->retry = NGX_CONF_UNSET;
conf->gso_enabled = NGX_CONF_UNSET;
+ conf->active_connection_id_limit = NGX_CONF_UNSET_UINT;
+
return conf;
}
@@ -204,6 +213,10 @@ ngx_stream_quic_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_str_value(conf->host_key, prev->host_key, "");
+ ngx_conf_merge_uint_value(conf->active_connection_id_limit,
+ conf->active_connection_id_limit,
+ 2);
+
if (conf->host_key.len == 0) {
conf->host_key.len = NGX_QUIC_DEFAULT_HOST_KEY_LEN;