MINOR: quic: PTO timer too often reset

It must be reset when the anti-amplication was reached but only if the
peer address was not validated.
This commit is contained in:
Frédéric Lécaille 2022-01-04 16:59:42 +01:00
parent 41a076087b
commit 078634d126

View File

@ -621,7 +621,8 @@ static inline void qc_set_timer(struct quic_conn *qc)
/* anti-amplification: the timer must be
* cancelled for a server which reached the anti-amplification limit.
*/
if (qc->flags & QUIC_FL_CONN_ANTI_AMPLIFICATION_REACHED) {
if (!quic_peer_validated_addr(qc) &&
(HA_ATOMIC_LOAD(&qc->flags) & QUIC_FL_CONN_ANTI_AMPLIFICATION_REACHED)) {
TRACE_PROTO("anti-amplification reached", QUIC_EV_CONN_STIMER, qc);
qc->timer = TICK_ETERNITY;
goto out;