From 078634d126501d998a597270bf01f949b0fff94c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 4 Jan 2022 16:59:42 +0100 Subject: [PATCH] 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. --- src/xprt_quic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 7b371fd63..b4dca7533 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -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; -- 2.47.3