Skip to content

Commit 2b985e4

Browse files
cognetcapflam
authored andcommitted
BUG/MEDIUM: quic: Don't try to use hystart if not implemented
Not every CC algos implement hystart, so only call the method if it is actually there. Failure to do so will cause crashes if hystart is on, and the algo doesn't implement it. This should fix github issue haproxy#3218 This should be backported up to 3.0. (cherry picked from commit a08bc46) Signed-off-by: Christopher Faulet <[email protected]> (cherry picked from commit d848a08) [cf: ctx adjt] Signed-off-by: Christopher Faulet <[email protected]>
1 parent 9484229 commit 2b985e4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/quic_tx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ static int qc_send_ppkts(struct buffer *buf, struct ssl_sock_ctx *ctx)
428428
}
429429
qc->path->in_flight += pkt->in_flight_len;
430430
pkt->pktns->tx.in_flight += pkt->in_flight_len;
431-
if ((quic_tune.options & QUIC_TUNE_CC_HYSTART) && pkt->pktns == qc->apktns)
431+
if ((quic_tune.options & QUIC_TUNE_CC_HYSTART) && pkt->pktns == qc->apktns &&
432+
cc->algo->hystart_start_round != NULL)
432433
cc->algo->hystart_start_round(cc, pkt->pn_node.key);
433434
if (pkt->in_flight_len)
434435
qc_set_timer(qc);

0 commit comments

Comments
 (0)