summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Lécaille <flecaille@haproxy.com>2023-05-02 08:57:37 +0200
committerAmaury Denoyelle <adenoyelle@haproxy.com>2023-05-11 10:33:23 +0200
commit0dd4fa58e6ead1a6723a6a126f9e8b0e6979d9c3 (patch)
tree5ed95b5ff175e5cc4246d9e9204829c332c397fc
parentd7d507aa8a6fcfe1518d68d5c8f8330d7ecd0130 (diff)
downloadhaproxy-0dd4fa58e6ead1a6723a6a126f9e8b0e6979d9c3.tar.gz
BUG/MINOR: quic: Buggy acknowlegments of acknowlegments function
qc_treat_ack_of_ack() must remove ranges of acknowlegments from an ebtree which have been acknowledged. This is done keeping track of the largest acknowledged packet number which has been acknowledged and sent with an ack-eliciting packet. But due to the data structure of the acknowledgement ranges used to build an ACK frame, one must leave at least one range in such an ebtree which must at least contain a unique one-element range with the largest acknowledged packet number as element. This issue was revealed by @Tristan971 in GH #2140. Must be backported in 2.7 and 2.6.
-rw-r--r--src/quic_conn.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quic_conn.c b/src/quic_conn.c
index 069609ab6..5c564843b 100644
--- a/src/quic_conn.c
+++ b/src/quic_conn.c
@@ -2056,6 +2056,12 @@ static void qc_treat_ack_of_ack(struct quic_conn *qc,
break;
}
+ /* Do not empty the tree: the first ACK range contains the
+ * largest acknowledged packet number.
+ */
+ if (arngs->sz == 1)
+ break;
+
eb64_delete(ar);
pool_free(pool_head_quic_arng, ar_node);
arngs->sz--;