BUG/MEDIUM: mux-h2: Remove H2_SF_NOTIFIED flag for H2S blocked on fast-forward

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.
This commit is contained in:
Christopher Faulet 2023-11-27 18:02:16 +01:00
parent 2a307d273a
commit af733ef6e4

View 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;
}