From: Frédéric Lécaille Date: Mon, 19 Jun 2023 08:47:24 +0000 (+0200) Subject: BUG/MINOR: quic: ticks comparison without ticks API use X-Git-Tag: v2.9-dev1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a55acf993a5795ed4f5255b30024a0dba10f15b1;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: ticks comparison without ticks API use Replace a "less than" comparison between two tick variable by a call to tick_is_lt() in quic_loss_pktns(). This bug could lead to a wrong packet loss detection when the loss time computed values could wrap. This is the case 20 seconds after haproxy has started. Must be backported as far as 2.6. --- diff --git a/src/quic_loss.c b/src/quic_loss.c index c44515c679..37b40cc7b4 100644 --- a/src/quic_loss.c +++ b/src/quic_loss.c @@ -66,7 +66,7 @@ struct quic_pktns *quic_loss_pktns(struct quic_conn *qc) for (i = QUIC_TLS_PKTNS_HANDSHAKE; i < QUIC_TLS_PKTNS_MAX; i++) { TRACE_PROTO("TX loss pktns", QUIC_EV_CONN_SPTO, qc, &qc->pktns[i]); if (!tick_isset(pktns->tx.loss_time) || - qc->pktns[i].tx.loss_time < pktns->tx.loss_time) + tick_is_lt(qc->pktns[i].tx.loss_time, pktns->tx.loss_time)) pktns = &qc->pktns[i]; }