Skip to content

Commit 11891e1

Browse files
committed
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.
1 parent 2092199 commit 11891e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/quic_tx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,8 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
20712071
goto no_room;
20722072
}
20732073

2074+
BUG_ON(qel->pktns->tx.pto_probe &&
2075+
!(pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING));
20742076
/* If this packet is ack-eliciting and we are probing let's
20752077
* decrement the PTO probe counter.
20762078
*/

0 commit comments

Comments
 (0)