]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Do not ack when probing
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 30 Aug 2022 14:24:54 +0000 (16:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Sep 2022 06:47:38 +0000 (08:47 +0200)
<force_ack> boolean variable passed to qc_do_build_pkt() which builds a clear
packet is there to force this function to build an ACK frame regardless of
others conditions. This is used during handshake, when we acknowledge every
handshake packets received.

This variable was already taken into an account by the local variable <must_ack>
which is there at least to ignore any other conditions than this one: "are
we building a probing packet?". Indeed we do not want to add ACK frames when
we probe the peers. This is to have more chances to embed the new duplicated frames
into another packets without splitting them. So, the test on <force_ack> boolean
value is useless, silly and brakes the rule which consists in not acknowledging
when probing.

Must be backported to 2.6.

src/xprt_quic.c

index 2ed8adbecf5aecf51f118ac315d5756152dbefd5..b377fa8d407c3e641354af11e826baa0baf20eba 100644 (file)
@@ -6694,7 +6694,7 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
        must_ack = !qel->pktns->tx.pto_probe &&
                (force_ack || ((qel->pktns->flags & QUIC_FL_PKTNS_ACK_REQUIRED) &&
                 (LIST_ISEMPTY(frms) || nb_aepkts_since_last_ack >= QUIC_MAX_RX_AEPKTS_SINCE_LAST_ACK)));
-       if (force_ack || must_ack) {
+       if (must_ack) {
            struct quic_arngs *arngs = &qel->pktns->rx.arngs;
            BUG_ON(eb_is_empty(&qel->pktns->rx.arngs.root));
                ack_frm.tx_ack.arngs = arngs;