BUG/MINOR: quic: transform qc_set_timer() as a reentrant function
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 11 Apr 2023 12:43:42 +0000 (14:43 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 18 Apr 2023 15:09:02 +0000 (17:09 +0200)
commit5f8704152abc18041ffafa5d461c911bccf2d5c0
treee28df22e6ecdfc05aaf2cd97847d02c90c846416
parent25174d51efbcda6d94bb2ebab786e0e191c069ce
BUG/MINOR: quic: transform qc_set_timer() as a reentrant function

qc_set_timer() function is used to rearm the timer for loss detection
and probing. Previously, timer was always rearm when congestion window
was free due to a wrong interpretation of the RFC which mandates the
client to rearm the timer before handshake completion to avoid a
deadlock related to anti-amplification.

Fix this by removing this code from quic_pto_pktns(). This allows
qc_set_timer() to be reentrant and only activate the timer if needed.

The impact of this bug seems limited. It can probably caused the timer
task to be processed too frequently which could caused too frequent
probing.

This change will allow to reuse easily qc_set_timer() after quic_conn
thread migration. As such, the new timer task will be scheduled only if
needed.

This should be backported up to 2.6.
src/quic_loss.c