]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: Remove H2_CF_DEM_DFULL flags when the demux buffer is reset
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 9 Sep 2025 13:46:30 +0000 (15:46 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 9 Sep 2025 14:29:14 +0000 (16:29 +0200)
This only happens when a connection error is detected or when the H2
connection is in ERR/ERR2 state. The demux buffer is explicitly reset. In
that case, it is important to remove the flag reporting this buffer as full.

It is probably worth to backport this patch to 3.2. But it is not mandatory
on older versions because it does not fix any known issue.

src/mux_h2.c

index 457df083f72f398b5c2a54449f7b18d9830fd465..f6a6533969a612df33ed1afa846a80641a41bb81 100644 (file)
@@ -5069,8 +5069,10 @@ static int h2_process(struct h2c *h2c)
                if (h2c->glitches != prev_glitches && !(h2c->flags & H2_CF_IS_BACK))
                        session_add_glitch_ctr(h2c->conn->owner, h2c->glitches - prev_glitches);
 
-               if (h2c->st0 >= H2_CS_ERROR || (h2c->flags & H2_CF_ERROR))
+               if (h2c->st0 >= H2_CS_ERROR || (h2c->flags & H2_CF_ERROR)) {
                        b_reset(&h2c->dbuf);
+                       h2c->flags &= ~H2_CF_DEM_DFULL;
+               }
        }
        was_blocked |= !!(h2c->flags & H2_CF_DEM_MROOM);
        h2_send(h2c);