From: Amaury Denoyelle Date: Thu, 12 Jun 2025 13:15:56 +0000 (+0200) Subject: BUG/MINOR: quic: prevent crash on startup with -dt X-Git-Tag: v3.3-dev2~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33cd96a5e9fb4f2e17401c69fd3ecfc1f46b02e2;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: prevent crash on startup with -dt QUIC traces in ssl_quic_srv_new_ssl_ctx() are problematic as this function is called early during startup. If activating traces via -dt command-line argument, a crash occurs due to stderr sink not yet available. Thus, traces from ssl_quic_srv_new_ssl_ctx() are simply removed. No backport needed. --- diff --git a/src/quic_ssl.c b/src/quic_ssl.c index 21c4237aa..327a24402 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -780,13 +780,9 @@ SSL_CTX *ssl_quic_srv_new_ssl_ctx(void) SSL_OP_SINGLE_ECDH_USE | SSL_OP_CIPHER_SERVER_PREFERENCE; - TRACE_ENTER(QUIC_EV_CONN_NEW); - ctx = SSL_CTX_new(TLS_client_method()); - if (!ctx) { - TRACE_ERROR("Could not allocate a new TLS context", QUIC_EV_CONN_NEW); + if (!ctx) goto err; - } SSL_CTX_set_options(ctx, options); SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION); @@ -797,12 +793,10 @@ SSL_CTX *ssl_quic_srv_new_ssl_ctx(void) #endif leave: - TRACE_LEAVE(QUIC_EV_CONN_NEW); return ctx; err: SSL_CTX_free(ctx); ctx = NULL; - TRACE_DEVEL("leaving on error", QUIC_EV_CONN_NEW); goto leave; }