From 3a051ca0c805a7fefb739706121cf57776992a03 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 9 Nov 2023 15:15:42 +0100 Subject: [PATCH] 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. --- src/mux_h1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h1.c b/src/mux_h1.c index 51854f28a..ab777a701 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);