]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-spop: Use the right bitwise operator in spop_ctl()
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 30 Apr 2025 13:58:53 +0000 (15:58 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 30 Apr 2025 14:01:36 +0000 (16:01 +0200)
Becaues of a typo, '||' was used instead of '|' to test the SPOP conneciton
flags and decide if the mux is ready or not. The regression was introduced
in the commit fd7ebf117 ("BUG/MEDIUM: mux-spop: Wait end of handshake to
declare a spop connection ready").

This patch must be backported to 3.1 with the commit above.

src/mux_spop.c

index 953692756a3a793de8a0a585467839c244255618..cb49f14a3616c75d711a0c1ae5ff4af41bdcd91a 100644 (file)
@@ -2674,7 +2674,7 @@ static int spop_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *ou
        switch (mux_ctl) {
        case MUX_CTL_STATUS:
                if ((spop_conn->state >= SPOP_CS_FRAME_H && spop_conn->state < SPOP_CS_ERROR) &&
-                   !(spop_conn->flags & (SPOP_CF_ERROR|SPOP_CF_ERR_PENDING|SPOP_CF_END_REACHED||SPOP_CF_RCVD_SHUT|SPOP_CF_DISCO_SENT|SPOP_CF_DISCO_FAILED)))
+                   !(spop_conn->flags & (SPOP_CF_ERROR|SPOP_CF_ERR_PENDING|SPOP_CF_END_REACHED|SPOP_CF_RCVD_SHUT|SPOP_CF_DISCO_SENT|SPOP_CF_DISCO_FAILED)))
                        ret |= MUX_STATUS_READY;
                return ret;
        case MUX_CTL_EXIT_STATUS: