From: Willy Tarreau Date: Wed, 30 Sep 2026 08:56:37 +0000 (+0200) Subject: BUG/MINOR: sample: make quic_enabled() always succeed X-Git-Tag: v3.5-dev8~84 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=6ac63b4b9969a9685d58007a36a2fb959dcd4ea5;p=haproxy.git BUG/MINOR: sample: make quic_enabled() always succeed smp_fetch_quic_enabled() ends with "return smp->data.u.sint" instead of "return 1", so it returns its boolean result as the success status of the fetch as well. On a build without QUIC, or when the QUIC listeners are disabled, the fetch therefore fails instead of reporting a false boolean, and any expression using it fails to evaluate. The issue was introduced in 2.8-dev2 with commit 33d11c464f ("MINOR: sample: Add "quic_enabled" sample fetch") so this fix should be backported to 2.8. --- diff --git a/src/sample.c b/src/sample.c index 54d8c88d7..d110ff7b7 100644 --- a/src/sample.c +++ b/src/sample.c @@ -5672,7 +5672,7 @@ static int smp_fetch_quic_enabled(const struct arg *args, struct sample *smp, co #else smp->data.u.sint = 0; #endif - return smp->data.u.sint; + return 1; } /* Timing events re{q,s}.timer. */