]> git.kaiwu.me - haproxy.git/commit
MINOR: quic: add tune.quic.sec.stateless-reset-rate
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 20 Aug 2026 16:23:18 +0000 (18:23 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Mon, 24 Aug 2026 17:16:05 +0000 (19:16 +0200)
commit297321e3eeb509b4afc458bd810d30e225446ba7
treecdb6a9a9686d5cdbb8787053090c824dd44f86b8
parentb24013000c9c1b4b2ac3b42eb177c6844211547d
MINOR: quic: add tune.quic.sec.stateless-reset-rate

RFC 9000 10.3 allows sending a Stateless Reset for any packet that can't
be matched to a connection. A flood of garbage UDP datagrams can turn this
into an unwitting amplifier, wasting CPU and bandwidth on replies.

Add tune.quic.sec.stateless-reset-rate to cap the total number of
Stateless Reset packets sent per second across all threads (default:
1000). It is not scoped to the frontend side: a Stateless Reset can be
sent for any unmatched packet, regardless of which side received it.
Each thread keeps its own THREAD_LOCAL freq_ctr and gets its own share
of the total, computed once at thread startup: thread <tid> gets
(N + tid) / nbthread, so the shares always add up to exactly N (no
rounding overshoot.

Tested by flooding a listener with short-header packets carrying random
DCIDs: the number of replies received matches the configured rate rather
than the number of packets sent, with normal traffic unaffected when well
under the limit.
doc/configuration.txt
include/haproxy/quic_tune-t.h
src/cfgparse-quic.c
src/quic_tx.c