BUG/MINOR: quic: fix computed length of emitted STREAM frames

qc_build_frms() is responsible to encode multiple frames in a single
QUIC packet. It accounts for room left in the buffer packet for each
newly encded frame.

An incorrect computation was performed when encoding a STREAM frame in a
single packet. Frame length was accounted twice which would reduce in
excess the buffer packet room. This caused the remaining built frames to
be reduced with the resulting packet not able to fill the whole MTU.

The impact of this bug should be minimal. It is only present when
multiple frames are encoded in a single packet after a STREAM. However
in this case datagrams built are smaller than expecting, which is
suboptimal for bandwith.

This should be backported up to 2.6.

(cherry picked from commit 50470a5181b6105ad1914c0d4e67794a2f69c80a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 8728d680e118f3049dd67e6f73b005984644d0f9)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 38415069a871fc2691da549096aba76d5f7f8004)
[cf: Applied on quic_conn.c]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed