From f8bff3b53103469dec94d233b9a8e11a35bdf562 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 2 Sep 2024 19:54:09 +0200 Subject: [PATCH] BUG/MINOR: mux-spop: always clear MUX_MFULL and DEM_MROOM when clearing the mbuf That's the equivalent of the mux-h2 one, except that here there's no real risk to loop since normally we cannot feed data that bypass the closed state check (e.g. no zero-copy forward). But it still remains dirty to be able to leave and empty mbuf with MFULL and MROOM set, so better clear them as well. No backport is needed since this is only in 3.1. --- src/mux_spop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mux_spop.c b/src/mux_spop.c index 8147e711e..b98b75dca 100644 --- a/src/mux_spop.c +++ b/src/mux_spop.c @@ -513,6 +513,9 @@ static inline void spop_release_mbuf(struct spop_conn *spop_conn) b_free(buf); count++; } + + spop_conn->flags &= ~(SPOP_CF_MUX_MFULL | SPOP_CF_DEM_MROOM); + if (count) offer_buffers(NULL, count); }