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.
This commit is contained in:
Frédéric Lécaille 2023-05-02 08:57:37 +02:00 committed by Amaury Denoyelle
parent d7d507aa8a
commit 0dd4fa58e6

View File

@ -2056,6 +2056,12 @@ static void qc_treat_ack_of_ack(struct quic_conn *qc,
break; break;
} }
/* Do not empty the tree: the first ACK range contains the
* largest acknowledged packet number.
*/
if (arngs->sz == 1)
break;
eb64_delete(ar); eb64_delete(ar);
pool_free(pool_head_quic_arng, ar_node); pool_free(pool_head_quic_arng, ar_node);
arngs->sz--; arngs->sz--;