Mercurial > hg > nginx-quic
comparison src/stream/ngx_stream_quic_module.c @ 8796: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 | dde5cb0205ef |
comparison
equal
deleted
inserted
replaced
8795:065c73221b7b | 8796:7106a918a277 |
---|---|
63 { ngx_string("quic_host_key"), | 63 { ngx_string("quic_host_key"), |
64 NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG, | 64 NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG, |
65 ngx_stream_quic_host_key, | 65 ngx_stream_quic_host_key, |
66 NGX_STREAM_SRV_CONF_OFFSET, | 66 NGX_STREAM_SRV_CONF_OFFSET, |
67 0, | 67 0, |
68 NULL }, | |
69 | |
70 { ngx_string("quic_active_connection_id_limit"), | |
71 NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1, | |
72 ngx_conf_set_num_slot, | |
73 NGX_STREAM_SRV_CONF_OFFSET, | |
74 offsetof(ngx_quic_conf_t, active_connection_id_limit), | |
68 NULL }, | 75 NULL }, |
69 | 76 |
70 ngx_null_command | 77 ngx_null_command |
71 }; | 78 }; |
72 | 79 |
174 conf->max_concurrent_streams_uni = NGX_CONF_UNSET_UINT; | 181 conf->max_concurrent_streams_uni = NGX_CONF_UNSET_UINT; |
175 | 182 |
176 conf->retry = NGX_CONF_UNSET; | 183 conf->retry = NGX_CONF_UNSET; |
177 conf->gso_enabled = NGX_CONF_UNSET; | 184 conf->gso_enabled = NGX_CONF_UNSET; |
178 | 185 |
186 conf->active_connection_id_limit = NGX_CONF_UNSET_UINT; | |
187 | |
179 return conf; | 188 return conf; |
180 } | 189 } |
181 | 190 |
182 | 191 |
183 static char * | 192 static char * |
201 | 210 |
202 ngx_conf_merge_value(conf->retry, prev->retry, 0); | 211 ngx_conf_merge_value(conf->retry, prev->retry, 0); |
203 ngx_conf_merge_value(conf->gso_enabled, prev->gso_enabled, 0); | 212 ngx_conf_merge_value(conf->gso_enabled, prev->gso_enabled, 0); |
204 | 213 |
205 ngx_conf_merge_str_value(conf->host_key, prev->host_key, ""); | 214 ngx_conf_merge_str_value(conf->host_key, prev->host_key, ""); |
215 | |
216 ngx_conf_merge_uint_value(conf->active_connection_id_limit, | |
217 conf->active_connection_id_limit, | |
218 2); | |
206 | 219 |
207 if (conf->host_key.len == 0) { | 220 if (conf->host_key.len == 0) { |
208 | 221 |
209 conf->host_key.len = NGX_QUIC_DEFAULT_HOST_KEY_LEN; | 222 conf->host_key.len = NGX_QUIC_DEFAULT_HOST_KEY_LEN; |
210 conf->host_key.data = ngx_palloc(cf->pool, conf->host_key.len); | 223 conf->host_key.data = ngx_palloc(cf->pool, conf->host_key.len); |