Mercurial > hg > nginx-quic
annotate src/http/v3/ngx_http_v3_module.c @ 7785:29354c6fc5f2 quic
TLS Key Update in QUIC.
Old keys retention is yet to be implemented.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 06 Apr 2020 14:54:08 +0300 |
parents | 0b95c2041887 |
children | 0f9e9786b90d |
rev | line source |
---|---|
7681 | 1 |
2 /* | |
3 * Copyright (C) Nginx, Inc. | |
4 * Copyright (C) Roman Arutyunyan | |
5 */ | |
6 | |
7 | |
8 #include <ngx_config.h> | |
9 #include <ngx_core.h> | |
10 #include <ngx_http.h> | |
11 | |
12 | |
13 static ngx_command_t ngx_http_v3_commands[] = { | |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
14 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
15 { ngx_string("quic_max_idle_timeout"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
16 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
17 ngx_conf_set_msec_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
18 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
19 offsetof(ngx_http_v3_srv_conf_t, quic.max_idle_timeout), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
20 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
21 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
22 { ngx_string("quic_max_ack_delay"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
23 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
24 ngx_conf_set_msec_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
25 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
26 offsetof(ngx_http_v3_srv_conf_t, quic.max_ack_delay), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
27 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
28 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
29 { ngx_string("quic_max_packet_size"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
30 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
31 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
32 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
33 offsetof(ngx_http_v3_srv_conf_t, quic.max_packet_size), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
34 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
35 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
36 { ngx_string("quic_initial_max_data"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
37 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
38 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
39 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
40 offsetof(ngx_http_v3_srv_conf_t, quic.initial_max_data), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
41 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
42 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
43 { ngx_string("quic_initial_max_stream_data_bidi_local"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
44 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
45 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
46 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
47 offsetof(ngx_http_v3_srv_conf_t, quic.initial_max_stream_data_bidi_local), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
48 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
49 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
50 { ngx_string("quic_initial_max_stream_data_bidi_remote"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
51 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
52 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
53 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
54 offsetof(ngx_http_v3_srv_conf_t, quic.initial_max_stream_data_bidi_remote), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
55 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
56 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
57 { ngx_string("quic_initial_max_stream_data_uni"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
58 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
59 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
60 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
61 offsetof(ngx_http_v3_srv_conf_t, quic.initial_max_stream_data_uni), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
62 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
63 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
64 { ngx_string("quic_initial_max_streams_bidi"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
65 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
66 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
67 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
68 offsetof(ngx_http_v3_srv_conf_t, quic.initial_max_streams_bidi), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
69 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
70 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
71 { ngx_string("quic_initial_max_streams_uni"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
72 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
73 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
74 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
75 offsetof(ngx_http_v3_srv_conf_t, quic.initial_max_streams_uni), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
76 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
77 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
78 { ngx_string("quic_ack_delay_exponent"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
79 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
80 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
81 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
82 offsetof(ngx_http_v3_srv_conf_t, quic.ack_delay_exponent), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
83 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
84 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
85 { ngx_string("quic_active_migration"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
86 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
87 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
88 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
89 offsetof(ngx_http_v3_srv_conf_t, quic.disable_active_migration), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
90 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
91 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
92 { ngx_string("quic_active_connection_id_limit"), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
93 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
94 ngx_conf_set_num_slot, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
95 NGX_HTTP_SRV_CONF_OFFSET, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
96 offsetof(ngx_http_v3_srv_conf_t, quic.active_connection_id_limit), |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
97 NULL }, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
98 |
7681 | 99 ngx_null_command |
100 }; | |
101 | |
102 | |
7714
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
103 static ngx_int_t ngx_http_variable_quic(ngx_http_request_t *r, |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
104 ngx_http_variable_value_t *v, uintptr_t data); |
7763
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
105 static ngx_int_t ngx_http_variable_http3(ngx_http_request_t *r, |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
106 ngx_http_variable_value_t *v, uintptr_t data); |
7714
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
107 static ngx_int_t ngx_http_v3_add_variables(ngx_conf_t *cf); |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
108 static void *ngx_http_v3_create_srv_conf(ngx_conf_t *cf); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
109 static char *ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
110 void *parent, void *child); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
111 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
112 |
7681 | 113 static ngx_http_module_t ngx_http_v3_module_ctx = { |
7714
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
114 ngx_http_v3_add_variables, /* preconfiguration */ |
7681 | 115 NULL, /* postconfiguration */ |
116 | |
117 NULL, /* create main configuration */ | |
118 NULL, /* init main configuration */ | |
119 | |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
120 ngx_http_v3_create_srv_conf, /* create server configuration */ |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
121 ngx_http_v3_merge_srv_conf, /* merge server configuration */ |
7681 | 122 |
123 NULL, /* create location configuration */ | |
124 NULL /* merge location configuration */ | |
125 }; | |
126 | |
127 | |
128 ngx_module_t ngx_http_v3_module = { | |
129 NGX_MODULE_V1, | |
130 &ngx_http_v3_module_ctx, /* module context */ | |
131 ngx_http_v3_commands, /* module directives */ | |
132 NGX_HTTP_MODULE, /* module type */ | |
133 NULL, /* init master */ | |
134 NULL, /* init module */ | |
135 NULL, /* init process */ | |
136 NULL, /* init thread */ | |
137 NULL, /* exit thread */ | |
138 NULL, /* exit process */ | |
139 NULL, /* exit master */ | |
140 NGX_MODULE_V1_PADDING | |
141 }; | |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
142 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
143 |
7714
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
144 static ngx_http_variable_t ngx_http_v3_vars[] = { |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
145 { ngx_string("quic"), NULL, ngx_http_variable_quic, |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
146 0, 0, 0 }, |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
147 |
7763
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
148 { ngx_string("http3"), NULL, ngx_http_variable_http3, |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
149 0, 0, 0 }, |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
150 |
7714
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
151 ngx_http_null_variable |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
152 }; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
153 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
154 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
155 static ngx_int_t |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
156 ngx_http_variable_quic(ngx_http_request_t *r, |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
157 ngx_http_variable_value_t *v, uintptr_t data) |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
158 { |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
159 if (r->connection->qs) { |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
160 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
161 v->len = 4; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
162 v->valid = 1; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
163 v->no_cacheable = 1; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
164 v->not_found = 0; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
165 v->data = (u_char *) "quic"; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
166 return NGX_OK; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
167 } |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
168 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
169 v->not_found = 1; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
170 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
171 return NGX_OK; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
172 } |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
173 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
174 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
175 static ngx_int_t |
7763
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
176 ngx_http_variable_http3(ngx_http_request_t *r, |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
177 ngx_http_variable_value_t *v, uintptr_t data) |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
178 { |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
179 v->valid = 1; |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
180 v->no_cacheable = 1; |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
181 v->not_found = 0; |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
182 |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
183 v->data = ngx_pnalloc(r->pool, sizeof("h3-xx") - 1); |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
184 if (v->data == NULL) { |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
185 return NGX_ERROR; |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
186 } |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
187 |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
188 v->len = ngx_sprintf(v->data, "h3-%d", NGX_QUIC_DRAFT_VERSION) - v->data; |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
189 |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
190 return NGX_OK; |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
191 } |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
192 |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
193 |
0b95c2041887
HTTP/3: http3 variable.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7737
diff
changeset
|
194 static ngx_int_t |
7714
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
195 ngx_http_v3_add_variables(ngx_conf_t *cf) |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
196 { |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
197 ngx_http_variable_t *var, *v; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
198 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
199 for (v = ngx_http_v3_vars; v->name.len; v++) { |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
200 var = ngx_http_add_variable(cf, &v->name, v->flags); |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
201 if (var == NULL) { |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
202 return NGX_ERROR; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
203 } |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
204 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
205 var->get_handler = v->get_handler; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
206 var->data = v->data; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
207 } |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
208 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
209 return NGX_OK; |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
210 } |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
211 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
212 |
abb7c1a4c9d5
Adedd the http "quic" variable.
Vladimir Homutov <vl@nginx.com>
parents:
7713
diff
changeset
|
213 |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
214 static void * |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
215 ngx_http_v3_create_srv_conf(ngx_conf_t *cf) |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
216 { |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
217 ngx_http_v3_srv_conf_t *v3cf; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
218 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
219 v3cf = ngx_pcalloc(cf->pool, sizeof(ngx_http_v3_srv_conf_t)); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
220 if (v3cf == NULL) { |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
221 return NULL; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
222 } |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
223 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
224 /* |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
225 * set by ngx_pcalloc(): |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
226 * v3cf->quic.original_connection_id = 0; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
227 * v3cf->quic.stateless_reset_token = { 0 } |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
228 * conf->quic.preferred_address = NULL |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
229 */ |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
230 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
231 v3cf->quic.max_idle_timeout = NGX_CONF_UNSET_MSEC; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
232 v3cf->quic.max_ack_delay = NGX_CONF_UNSET_MSEC; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
233 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
234 v3cf->quic.max_packet_size = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
235 v3cf->quic.initial_max_data = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
236 v3cf->quic.initial_max_stream_data_bidi_local = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
237 v3cf->quic.initial_max_stream_data_bidi_remote = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
238 v3cf->quic.initial_max_stream_data_uni = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
239 v3cf->quic.initial_max_streams_bidi = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
240 v3cf->quic.initial_max_streams_uni = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
241 v3cf->quic.ack_delay_exponent = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
242 v3cf->quic.disable_active_migration = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
243 v3cf->quic.active_connection_id_limit = NGX_CONF_UNSET_UINT; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
244 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
245 return v3cf; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
246 } |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
247 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
248 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
249 static char * |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
250 ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
251 { |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
252 ngx_http_v3_srv_conf_t *prev = parent; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
253 ngx_http_v3_srv_conf_t *conf = child; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
254 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
255 ngx_conf_merge_msec_value(conf->quic.max_idle_timeout, |
7737
8e54a17dabee
Respect QUIC max_idle_timeout.
Roman Arutyunyan <arut@nginx.com>
parents:
7731
diff
changeset
|
256 prev->quic.max_idle_timeout, 60000); |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
257 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
258 // > 2 ^ 14 is invalid |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
259 ngx_conf_merge_msec_value(conf->quic.max_ack_delay, |
7731
d45325e90221
Limit output QUIC packets with client max_packet_size.
Roman Arutyunyan <arut@nginx.com>
parents:
7714
diff
changeset
|
260 prev->quic.max_ack_delay, |
d45325e90221
Limit output QUIC packets with client max_packet_size.
Roman Arutyunyan <arut@nginx.com>
parents:
7714
diff
changeset
|
261 NGX_QUIC_DEFAULT_MAX_ACK_DELAY); |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
262 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
263 // < 1200 is invalid |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
264 ngx_conf_merge_uint_value(conf->quic.max_packet_size, |
7731
d45325e90221
Limit output QUIC packets with client max_packet_size.
Roman Arutyunyan <arut@nginx.com>
parents:
7714
diff
changeset
|
265 prev->quic.max_packet_size, |
d45325e90221
Limit output QUIC packets with client max_packet_size.
Roman Arutyunyan <arut@nginx.com>
parents:
7714
diff
changeset
|
266 NGX_QUIC_DEFAULT_MAX_PACKET_SIZE); |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
267 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
268 ngx_conf_merge_uint_value(conf->quic.initial_max_data, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
269 prev->quic.initial_max_data, 10000000); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
270 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
271 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_bidi_local, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
272 prev->quic.initial_max_stream_data_bidi_local, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
273 255); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
274 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
275 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_bidi_remote, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
276 prev->quic.initial_max_stream_data_bidi_remote, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
277 255); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
278 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
279 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_uni, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
280 prev->quic.initial_max_stream_data_uni, 255); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
281 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
282 ngx_conf_merge_uint_value(conf->quic.initial_max_streams_bidi, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
283 prev->quic.initial_max_streams_bidi, 16); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
284 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
285 ngx_conf_merge_uint_value(conf->quic.initial_max_streams_uni, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
286 prev->quic.initial_max_streams_uni, 16); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
287 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
288 // > 20 is invalid |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
289 ngx_conf_merge_uint_value(conf->quic.ack_delay_exponent, |
7731
d45325e90221
Limit output QUIC packets with client max_packet_size.
Roman Arutyunyan <arut@nginx.com>
parents:
7714
diff
changeset
|
290 prev->quic.ack_delay_exponent, |
d45325e90221
Limit output QUIC packets with client max_packet_size.
Roman Arutyunyan <arut@nginx.com>
parents:
7714
diff
changeset
|
291 NGX_QUIC_DEFAULT_ACK_DELAY_EXPONENT); |
7713
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
292 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
293 ngx_conf_merge_uint_value(conf->quic.disable_active_migration, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
294 prev->quic.disable_active_migration, 1); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
295 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
296 // < 2 is invalid |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
297 ngx_conf_merge_uint_value(conf->quic.active_connection_id_limit, |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
298 prev->quic.active_connection_id_limit, 2); |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
299 |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
300 return NGX_CONF_OK; |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
301 } |
e9891e8ee975
Configurable transport parameters.
Vladimir Homutov <vl@nginx.com>
parents:
7681
diff
changeset
|
302 |