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.
This commit is contained in:
Frederic Lecaille 2024-11-04 17:55:38 +01:00
parent 601b34fe7b
commit 444a19ea38

View 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.
*/