]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h2: Remove H2_SF_NOTIFIED flag for H2S blocked on fast-forward
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Nov 2023 17:02:16 +0000 (18:02 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Nov 2023 13:01:56 +0000 (14:01 +0100)
When a H2 stream is blocked during data fast-forwarding, we must take care
to remove H2_SF_NOTIFIED flag. This was only performed when data
fast-forward was attempted. However, if the H2 stream was blocked for any
reason, this flag was not removed. During our tests, we found it was
possible to infinitely block a connection because one of its streams was in
the send_list with the flag set. In this case, the stream was no longer
woken up to resume the sends, blocking all other streams.

No backport needed.

src/mux_h2.c

index c6b30ff5475446b438f0ace21803132907be8a6c..ff6a85a2f9b68d3d869b346fbee0460a31fac332 100644 (file)
@@ -7041,6 +7041,8 @@ static size_t h2_nego_ff(struct stconn *sc, struct buffer *input, size_t count,
 
        ret = count - h2s->sd->iobuf.data;
  end:
+       if (h2s->sd->iobuf.flags & IOBUF_FL_FF_BLOCKED)
+               h2s->flags &= ~H2_SF_NOTIFIED;
        TRACE_LEAVE(H2_EV_H2S_SEND|H2_EV_STRM_SEND, h2s->h2c->conn, h2s);
        return ret;
 }