]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: check: do not inspect errno if conn FDLESS
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 9 Oct 2026 07:28:26 +0000 (09:28 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 16 Oct 2026 08:19:23 +0000 (10:19 +0200)
On check failure, conn errno is inspected via
retrieve_errno_from_socket(), which relies on the connection FD. When
using a CO_FL_FDLESS connection, this triggers a BUG_ON().

This causes crashes for QUIC backend checks, available since 3.3. To fix
this, simply skip call to retrieve_errno_from_socket() when CO_FL_FDLESS
is set.

This must be backported up to 3.3.

src/check.c

index 78bde2e89a06d5d5518f61fb14464118f88508c3..2f9fec36a8025d070184d4306492418d741a5f8d 100644 (file)
@@ -816,7 +816,7 @@ void chk_report_conn_err(struct check *check, int errno_bck, int expired)
        }
 
        errno = unclean_errno(errno_bck);
-       if (conn && !errno)
+       if (conn && !errno && !(conn->flags & CO_FL_FDLESS))
                retrieve_errno_from_socket(conn);
 
        TRACE_ENTER(CHK_EV_HCHK_END|CHK_EV_HCHK_ERR, check, 0, 0, (size_t[]){expired});