aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2023-01-26 15:25:33 +0400
committerRoman Arutyunyan <arut@nginx.com>2023-01-26 15:25:33 +0400
commita5f9b45aee3c2bdbd3fcd4f8fc6b6903b1214705 (patch)
treef2dbd4a9b48fde844cca6a95c2b31b86f247d0c1 /src
parent815ef96124176baef4e940c4beaec158305b368a (diff)
downloadnginx-a5f9b45aee3c2bdbd3fcd4f8fc6b6903b1214705.tar.gz
nginx-a5f9b45aee3c2bdbd3fcd4f8fc6b6903b1214705.zip
HTTP/3: trigger more compatibility errors for "listen quic".
Now "ssl", "proxy_protocol" and "http2" are not allowed with "quic" in "listen" directive. Previously, only "ssl" was not allowed.
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index f22d3bdab..3251e6da9 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -4320,10 +4320,26 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NGX_CONF_ERROR;
}
-#if (NGX_HTTP_SSL && NGX_HTTP_V3)
- if (lsopt.ssl && lsopt.quic) {
- return "\"ssl\" parameter is incompatible with \"quic\"";
+#if (NGX_HTTP_V3)
+
+ if (lsopt.quic) {
+#if (NGX_HTTP_SSL)
+ if (lsopt.ssl) {
+ return "\"ssl\" parameter is incompatible with \"quic\"";
+ }
+#endif
+
+#if (NGX_HTTP_V2)
+ if (lsopt.http2) {
+ return "\"http2\" parameter is incompatible with \"quic\"";
+ }
+#endif
+
+ if (lsopt.proxy_protocol) {
+ return "\"proxy_protocol\" parameter is incompatible with \"quic\"";
+ }
}
+
#endif
for (n = 0; n < u.naddrs; n++) {