From: Christopher Faulet Date: Thu, 9 Nov 2023 14:15:42 +0000 (+0100) Subject: BUG/MEDIUM: mux-h1: Exit early if fast-forward is not supported by opposite SC X-Git-Tag: v2.9-dev10~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a051ca0c805a7fefb739706121cf57776992a03;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux-h1: Exit early if fast-forward is not supported by opposite SC The commit 4be0c7c65 ("MEDIUM: stconn/muxes: Loop on data fast-forwarding to forward at least a buffer") introduced a regression. In h1_fastfwd(), if data fast-forwarding is not supported by the opposite SC, we must exit without calling se_donn_ff(). Otherwise a BUG_ON() will be triggered because the opposite mux has no .done_fastfwd() callback function. No backport needed. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 51854f28af..ab777a701b 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -4606,7 +4606,7 @@ static int h1_fastfwd(struct stconn *sc, unsigned int count, unsigned int flags) /* Fast forwading is not supported by the consumer */ h1c->flags = (h1c->flags & ~H1C_F_WANT_FASTFWD) | H1C_F_CANT_FASTFWD; TRACE_DEVEL("Fast-forwarding not supported by opposite endpoint, disable it", H1_EV_STRM_RECV, h1c->conn, h1s); - goto out; + goto end; } if (sdo->iobuf.flags & IOBUF_FL_FF_BLOCKED) { se_fl_set(h1s->sd, SE_FL_RCV_MORE | SE_FL_WANT_ROOM);