BUG/MINOR: quic: Wrong PTO calculation

Due to missing brackets around the ternary C operator, quic_pto() could return zero
at the first run, before the QUIC connection was completely initialized. This leaded
the idle timeout task to be executed before this initialization completion. Then
this connection could be immediately released.

This bug was revealed by the multi_packet_client_hello QUIC tracker test.

Must be backported to 2.6.
This commit is contained in:
Frédéric Lécaille 2022-06-08 10:09:39 +02:00
parent 3f96a0a4c1
commit fa94f77bc5
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ static inline unsigned int quic_pto(struct quic_conn *qc)
struct quic_loss *ql = &qc->path->loss;
return (ql->srtt >> 3) + QUIC_MAX(ql->rtt_var, QUIC_TIMER_GRANULARITY) +
HA_ATOMIC_LOAD(&qc->state) >= QUIC_HS_ST_COMPLETE ? qc->max_ack_delay : 0;
(HA_ATOMIC_LOAD(&qc->state) >= QUIC_HS_ST_COMPLETE ? qc->max_ack_delay : 0);
}
void quic_loss_srtt_update(struct quic_loss *ql,