Skip to content

Commit 353786e

Browse files
committed
WIP: quic: Add a BUG_ON to qc_send()
This is to ensure qc_send() respects the <max_dgrams> limit passed as parameter.
1 parent 65eda95 commit 353786e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/quic_tx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,7 @@ int qc_send(struct quic_conn *qc, int old_data, struct list *send_list,
880880
}
881881

882882
ret += prep_pkts;
883+
BUG_ON(max_dgrams && ret > max_dgrams);
883884
if (max_dgrams && ret == max_dgrams && !LIST_ISEMPTY(send_list)) {
884885
TRACE_DEVEL("stopping for artificial pacing", QUIC_EV_CONN_TXPKT, qc);
885886
break;

0 commit comments

Comments
 (0)