From 4b9c8b24c524368e13e15b8e889f9f35c3679c09 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 4 Jun 2026 18:55:23 +0200 Subject: [PATCH] BUG/MEDIUM: check: Ignore small-buffer option when starting an external check When an external check is started for a server, there is no tcpcheck ruleset. The pointer is NULL. It was an issue leading to a crash if the small-buffer option was enabled on the healthchecks. However, it is irrelevant for external checks because it is only usefull to tcp checks. So, the option must be ignored if there is no tcpcheck ruleset. This patch must be backported to 3.4. --- src/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check.c b/src/check.c index be9794680..f3df19077 100644 --- a/src/check.c +++ b/src/check.c @@ -1682,7 +1682,7 @@ static int start_checks() for (px = proxies_list; px; px = px->next) { for (s = px->srv; s; s = s->next) { if ((px->options2 & PR_O2_USE_SBUF_CHECK) && - (s->check.tcpcheck->rs->flags & TCPCHK_RULES_MAY_USE_SBUF)) + (s->check.tcpcheck->rs && s->check.tcpcheck->rs->flags & TCPCHK_RULES_MAY_USE_SBUF)) s->check.state |= CHK_ST_USE_SMALL_BUFF; if (s->check.state & CHK_ST_CONFIGURED) {