From e6edbf52ed10da58d49100b345d899f3044fcb50 Mon Sep 17 00:00:00 2001 From: Frederic Lecaille Date: Wed, 13 Nov 2024 17:24:27 +0000 Subject: [PATCH] WIP: quic: Add a BUG_ON to qc_send() This is to ensure qc_send() respects the limit passed as parameter. --- src/quic_tx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quic_tx.c b/src/quic_tx.c index 77a7dbb74..41590029e 100644 --- a/src/quic_tx.c +++ b/src/quic_tx.c @@ -880,6 +880,7 @@ int qc_send(struct quic_conn *qc, int old_data, struct list *send_list, } ret += prep_pkts; + BUG_ON(max_dgrams && ret > max_dgrams); if (max_dgrams && ret == max_dgrams && !LIST_ISEMPTY(send_list)) { TRACE_DEVEL("stopping for artificial pacing", QUIC_EV_CONN_TXPKT, qc); break;