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.
This commit is contained in:
Frédéric Lécaille 2023-06-19 10:47:24 +02:00 committed by Amaury Denoyelle
parent e6051a04ef
commit a55acf993a

View File

@ -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];
}