]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: tcpcheck: Properly retrieve tcpcheck type to install the best mux
authorChristopher Faulet <cfaulet@haproxy.com>
Sun, 5 Apr 2026 07:22:11 +0000 (09:22 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Sun, 5 Apr 2026 07:26:46 +0000 (09:26 +0200)
When the healthcheck section support was added, the tcpcheck type was moved
into the tcpcheck ruleset. However, conn_install_mux_chk() function was not
updated accordingly. So the TCP mode was always returned.

No backport needed. This patch is related to #3324 but it is not the root
cause of the issue.

src/connection.c

index 677f3f4744387eb0534d5bf2af9ff3a30f1cdaaf..52a6fb3683cc3fb817dc17cbbe9aca41adb1b8df 100644 (file)
@@ -412,7 +412,7 @@ int conn_install_mux_chk(struct connection *conn, void *ctx, struct session *ses
                struct ist mux_proto;
                const char *alpn_str = NULL;
                int alpn_len = 0;
-               int mode = tcpchk_rules_type_to_proto_mode(check->tcpcheck->flags);
+               int mode = tcpchk_rules_type_to_proto_mode(check->tcpcheck->rs->flags);
 
                conn_get_alpn(conn, &alpn_str, &alpn_len);
                mux_proto = ist2(alpn_str, alpn_len);