From: Frédéric Lécaille Date: Tue, 4 Jan 2022 15:59:42 +0000 (+0100) Subject: MINOR: quic: PTO timer too often reset X-Git-Tag: v2.6-dev1~166 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=078634d126501d998a597270bf01f949b0fff94c;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 7b371fd635..b4dca7533b 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;