From: Frederic Lecaille Date: Mon, 4 Nov 2024 16:55:38 +0000 (+0100) Subject: MINOR: quic: Help diagnosing malformed probing packets X-Git-Tag: v3.1-dev12~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=444a19ea3873a6e80e6152699d3e559c5ec1f483;p=thirdparty%2Fhaproxy.git MINOR: quic: Help diagnosing malformed probing packets 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. --- diff --git a/src/quic_tx.c b/src/quic_tx.c index b2ad2ad347..4a72e9fe94 100644 --- a/src/quic_tx.c +++ b/src/quic_tx.c @@ -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. */