]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-quic: Stop zero-copy FF during nego if input is not empty
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Nov 2023 21:24:45 +0000 (22:24 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 29 Nov 2023 07:59:27 +0000 (08:59 +0100)
When the producer negociate with the QUIC mux to perform a zero-copy
fast-forward, data in the input buffer are first transferred in the H3
buffer. However, after the transfer, if the input buffer is not empty, the
data fast-forwarding must be stopped. In this case, qmux_nego_ff() must
return 0.

No backport needed.

src/mux_quic.c

index c22668c8349b7a0bb36f87cb21ee94c68dcd5af1..36e5671a1e1a46144404104c9429912b01381a01 100644 (file)
@@ -2843,8 +2843,10 @@ static size_t qmux_nego_ff(struct stconn *sc, struct buffer *input, size_t count
                b_sub(qcs->sd->iobuf.buf, qcs->sd->iobuf.offset);
 
                /* Cannot forward more data, wait for room */
-               if (b_data(input))
+               if (b_data(input)) {
+                       ret = 0;
                        goto end;
+               }
        }
        ret -= qcs->sd->iobuf.data;