]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cfgparse: Do not modify the QUIC xprt when parsing "ssl".
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 23 Nov 2020 10:33:12 +0000 (11:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Dec 2020 10:57:26 +0000 (11:57 +0100)
When parsing "ssl" keyword for TLS bindings, we must not use the same xprt as the one
for TLS/TCP connections. So, do not modify the QUIC xprt which will be initialized
when parsing QUIC addresses wich "ssl" bindings.

src/cfgparse-ssl.c

index 47e05929755c2e69ff1fae18b5e6da719c1b1872..3d58cd22d963c9d1cdd054a8baf16828ee9f3018 100644 (file)
@@ -1040,7 +1040,9 @@ static int bind_parse_alpn(char **args, int cur_arg, struct proxy *px, struct bi
 /* parse the "ssl" bind keyword */
 static int bind_parse_ssl(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
 {
-       conf->xprt = &ssl_sock;
+       /* Do not change the xprt for QUIC. */
+       if (conf->xprt != xprt_get(XPRT_QUIC))
+               conf->xprt = &ssl_sock;
        conf->is_ssl = 1;
 
        if (global_ssl.listen_default_ciphers && !conf->ssl_conf.ciphers)