Skip to content

Commit 7472990

Browse files
committed
BUG/MINOR: quic: Avoid BUG_ON() on ->on_pkt_lost() BBR callback call
The per-packet delivery rate sample is applied to ack-eliciting packet only calling ->drs_on_transmit() BBR callback. So, ->on_pkt_lost() which inspects the delivery rate sampling information during packet loss detection must not be called for non ack-eliciting packet. If not, it would be facing with non initialized variables with big chance to trigger a BUG_ON(). As BBR is implemented in the current developement version, there is no need to backport this patch.
1 parent b306398 commit 7472990

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/quic_loss.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ void qc_packet_loss_lookup(struct quic_pktns *pktns, struct quic_conn *qc,
216216
if (tick_is_le(loss_time_limit, now_ms) || reordered) {
217217
struct quic_cc *cc = &qc->path->cc;
218218

219-
if (cc->algo->on_pkt_lost)
219+
/* Delivery rate sampling is applied to ack-eliciting packet only. */
220+
if ((pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING) &&
221+
cc->algo->on_pkt_lost)
220222
cc->algo->on_pkt_lost(cc, pkt, pkt->rs.lost);
221223
eb64_delete(&pkt->pn_node);
222224
LIST_APPEND(lost_pkts, &pkt->list);

0 commit comments

Comments
 (0)