]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: quic: fix received ACK stream calculation
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 24 Feb 2022 16:39:57 +0000 (17:39 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 24 Feb 2022 17:37:39 +0000 (18:37 +0100)
commit119965f15e4ca93473dc9c6f5dbac2880198f622
tree6e3f787bae2f84446373542e821f1e0550279e7d
parent282b6a7539add7517f2b16cc82b6a3509492fd76
BUG/MEDIUM: quic: fix received ACK stream calculation

Adjust the handling of ACK for STREAM frames. When receiving a ACK, the
corresponding frames from the acknowledged packet are retrieved. If a
frame is of type STREAM, we compare the frame STREAM offset with the
last offset known of the qcs instance.

The comparison was incomplete as it did not treat a acked offset smaller
than the known offset. Previously, the acked frame was incorrectly
buffered in the qcs.tx.acked_frms. On reception of future ACKs, when
trying to process the buffered acks via qcs_try_to_consume, the loop is
interrupted on the smallest offset different from the qcs known offset :
in this case it will be the previous smaller range. This is a real bug
as it prevents all buffered ACKs to be processed, eventually filling the
qcs sending buffer and cause the transfer to stall.

Fix this by properly properly handle smaller acked offset. First check
if the offset length is greater than the qcs offset and mark as
acknowledged the difference on the qcs. If not, the frame is not
buffered and simply ignored.
src/xprt_quic.c