]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-spop: always clear MUX_MFULL and DEM_MROOM when clearing the mbuf
authorWilly Tarreau <w@1wt.eu>
Mon, 2 Sep 2024 17:54:09 +0000 (19:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Sep 2024 12:39:04 +0000 (14:39 +0200)
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

index 8147e711e8480666a3dbb8e64e4b766c33322348..b98b75dca5d72cecee62aa1d10cd1458b8d8caa9 100644 (file)
@@ -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);
 }