Mercurial > hg > nginx
comparison src/http/v3/ngx_http_v3_module.c @ 8970:7106a918a277 quic
QUIC: the "quic_active_connection_id_limit" directive.
The directive sets corresponding transport parameter and limits number of
created client ids.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Tue, 18 Jan 2022 12:49:55 +0300 |
parents | d6ef13c5fd8e |
children | 1192923be0aa |
comparison
equal
deleted
inserted
replaced
8969:065c73221b7b | 8970:7106a918a277 |
---|---|
100 { ngx_string("quic_host_key"), | 100 { ngx_string("quic_host_key"), |
101 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, | 101 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
102 ngx_http_quic_host_key, | 102 ngx_http_quic_host_key, |
103 NGX_HTTP_SRV_CONF_OFFSET, | 103 NGX_HTTP_SRV_CONF_OFFSET, |
104 0, | 104 0, |
105 NULL }, | |
106 | |
107 { ngx_string("quic_active_connection_id_limit"), | |
108 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, | |
109 ngx_conf_set_num_slot, | |
110 NGX_HTTP_SRV_CONF_OFFSET, | |
111 offsetof(ngx_http_v3_srv_conf_t, quic.active_connection_id_limit), | |
105 NULL }, | 112 NULL }, |
106 | 113 |
107 ngx_null_command | 114 ngx_null_command |
108 }; | 115 }; |
109 | 116 |
238 h3scf->quic.max_concurrent_streams_uni = NGX_HTTP_V3_MAX_UNI_STREAMS; | 245 h3scf->quic.max_concurrent_streams_uni = NGX_HTTP_V3_MAX_UNI_STREAMS; |
239 h3scf->quic.retry = NGX_CONF_UNSET; | 246 h3scf->quic.retry = NGX_CONF_UNSET; |
240 h3scf->quic.gso_enabled = NGX_CONF_UNSET; | 247 h3scf->quic.gso_enabled = NGX_CONF_UNSET; |
241 h3scf->quic.stream_close_code = NGX_HTTP_V3_ERR_NO_ERROR; | 248 h3scf->quic.stream_close_code = NGX_HTTP_V3_ERR_NO_ERROR; |
242 h3scf->quic.stream_reject_code_bidi = NGX_HTTP_V3_ERR_REQUEST_REJECTED; | 249 h3scf->quic.stream_reject_code_bidi = NGX_HTTP_V3_ERR_REQUEST_REJECTED; |
250 h3scf->quic.active_connection_id_limit = NGX_CONF_UNSET_UINT; | |
243 | 251 |
244 return h3scf; | 252 return h3scf; |
245 } | 253 } |
246 | 254 |
247 | 255 |
277 | 285 |
278 ngx_conf_merge_value(conf->quic.retry, prev->quic.retry, 0); | 286 ngx_conf_merge_value(conf->quic.retry, prev->quic.retry, 0); |
279 ngx_conf_merge_value(conf->quic.gso_enabled, prev->quic.gso_enabled, 0); | 287 ngx_conf_merge_value(conf->quic.gso_enabled, prev->quic.gso_enabled, 0); |
280 | 288 |
281 ngx_conf_merge_str_value(conf->quic.host_key, prev->quic.host_key, ""); | 289 ngx_conf_merge_str_value(conf->quic.host_key, prev->quic.host_key, ""); |
290 | |
291 ngx_conf_merge_uint_value(conf->quic.active_connection_id_limit, | |
292 prev->quic.active_connection_id_limit, | |
293 2); | |
282 | 294 |
283 if (conf->quic.host_key.len == 0) { | 295 if (conf->quic.host_key.len == 0) { |
284 | 296 |
285 conf->quic.host_key.len = NGX_QUIC_DEFAULT_HOST_KEY_LEN; | 297 conf->quic.host_key.len = NGX_QUIC_DEFAULT_HOST_KEY_LEN; |
286 conf->quic.host_key.data = ngx_palloc(cf->pool, | 298 conf->quic.host_key.data = ngx_palloc(cf->pool, |