]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-htx: Fix bad test on h1c flags in h1_recv_allowed()
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Nov 2018 16:13:52 +0000 (17:13 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Nov 2018 16:22:37 +0000 (17:22 +0100)
A logical OR was used instead of a binary OR. Thanks to David Carlier to spot
and report this bug.

src/mux_h1.c

index 87b58415740ffba9f1eb2e0c28f2cbced1fec35c..2e28d369e11ee23994e43f76d10671e975a9f3ab 100644 (file)
@@ -128,7 +128,7 @@ static void h1_shutw_conn(struct connection *conn);
 static inline int h1_recv_allowed(const struct h1c *h1c)
 {
        if (b_data(&h1c->ibuf) == 0 &&
-           (h1c->flags & (H1C_F_CS_ERROR||H1C_F_CS_SHUTW) ||
+           (h1c->flags & (H1C_F_CS_ERROR|H1C_F_CS_SHUTW) ||
             h1c->conn->flags & CO_FL_ERROR ||
             conn_xprt_read0_pending(h1c->conn)))
                return 0;