]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Missing parentheses around PTO probe variable.
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 20 Jul 2023 13:45:41 +0000 (15:45 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 21 Jul 2023 12:31:42 +0000 (14:31 +0200)
It is hard to analyze the impact of this bug. I guess it could lead a connection
to probe infinitively (with an exponential backoff probe timeout) during an handshake,
but one has never seen such a case.

Add missing parentheses around ->flags of the TX packet built by qc_do_build_pkt()
to detect that this packet embeds ack-eliciting frames. In this case if a probing
packet was needed the ->pto_probe value of the packet number space must be
decremented.

Must be backported as far as 2.6.

src/quic_conn.c

index a652c0f90cfb74143e10eaee4d2b5fc970b62145..76c004168ab1a3a941b07583b317abc412e7006b 100644 (file)
@@ -8044,7 +8044,7 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
        /* If this packet is ack-eliciting and we are probing let's
         * decrement the PTO probe counter.
         */
-       if (pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING &&
+       if ((pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING) &&
            qel->pktns->tx.pto_probe)
                qel->pktns->tx.pto_probe--;