Skip to content

Commit

Permalink
MINOR: quic: Help diagnosing malformed probing packets
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
haproxyFred committed Nov 4, 2024
1 parent 2092199 commit 11891e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/quic_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 11891e1

Please sign in to comment.