On 12/3/26 07:34, Dongwon Jang wrote:
> 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 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/quic_ssl.c b/src/quic_ssl.c
> index 5f1fc9687..3cf378226 100644
> --- a/src/quic_ssl.c
> +++ b/src/quic_ssl.c
> @@ -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)) {

Merged! Thank you!


Reply via email to