From: Willy Tarreau Date: Wed, 9 Aug 2023 09:51:58 +0000 (+0200) Subject: BUG/MEDIUM: mux-h1: fix incorrect state checking in h1_process_mux() X-Git-Tag: v2.9-dev3~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=949371a00dca228c31b59392615e5f087dcc6552;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux-h1: fix incorrect state checking in h1_process_mux() That's a regression introduced in 2.9-dev by commit 723c73f8a ("MEDIUM: mux-h1: Split h1_process_mux() to make code more readable") and found by Christopher. The consequence is uncertain but the test definitely was not right in that it would catch most existing states (H1_MSG_DONE=30). At least it would emit too many "H1 request fully xferred". No backport needed. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 667eff50be..2d84724fba 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2997,7 +2997,7 @@ static size_t h1_process_mux(struct h1c *h1c, struct buffer *buf, size_t count) total += ret; count -= ret; - if ((h1m->state & H1_MSG_DONE)) { + if ((h1m->state == H1_MSG_DONE)) { TRACE_USER((!(h1m->flags & H1_MF_RESP) ? "H1 request fully xferred" : "H1 response fully xferred"), H1_EV_TX_DATA, h1c->conn, h1s);