]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: quic: initialize the flags of the QUIC ssl_sock_ctx
authorDongwon Jang <contact@dongwonjang.com>
Thu, 3 Dec 2026 06:34:07 +0000 (15:34 +0900)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 3 Dec 2026 09:24:57 +0000 (10:24 +0100)
qc_alloc_ssl_sock_ctx() takes the ssl_sock_ctx from a pool and does not
initialize its <flags>, so they may be those of a previous connection.
Nothing reads these flags on a QUIC connection for now:
SSL_SOCK_F_HAS_ALPN is set there by the ALPN callback but is only
tested by the TCP I/O handler.

Let's initialize them so that a flag can be read from a QUIC connection
as well. Otherwise the flag added by the next commit could be seen on a
QUIC connection which did not set it.

src/quic_ssl.c

index 5f1fc9687acfc652653d24176d5798e6bce2819a..3cf3782265e3154fadf2f8675c7d64f875a712ef 100644 (file)
@@ -1359,6 +1359,7 @@ int qc_alloc_ssl_sock_ctx(struct quic_conn *qc, void *target,
        ctx->error_code = 0;
        ctx->early_buf = BUF_NULL;
        ctx->sent_early_data = 0;
+       ctx->flags = 0;
        ctx->qc = qc;
 
        if (!qc_is_back(qc)) {