]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Help diagnosing malformed probing packets
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 4 Nov 2024 16:55:38 +0000 (17:55 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Tue, 5 Nov 2024 19:17:35 +0000 (20:17 +0100)
Add a BUG_ON() to detect some malformed packets which are supposed to probe the
peer without being ack-eliciting: the peer would not acknowledged such packets.

src/quic_tx.c

index b2ad2ad3475a4c156432bbb60ca34d74bc3b66e3..4a72e9fe943962f791e3340bf82e57c4a72c0fc1 100644 (file)
@@ -2071,6 +2071,8 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
                goto no_room;
        }
 
+       BUG_ON(qel->pktns->tx.pto_probe &&
+              !(pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING));
        /* If this packet is ack-eliciting and we are probing let's
         * decrement the PTO probe counter.
         */