HomeFreeBSD

pf: add a generic packet rate matching filter

Description

pf: add a generic packet rate matching filter

allows things like
pass in proto icmp max-pkt-rate 100/10
all packets matching the rule in the direction the state was created are
taken into consideration (typically: requests, but not replies).
Just like with the other max-*, the rule stops matching if the maximum is
reached, so in typical scenarios the default block rule would kick in then.
with input from Holger Mikolon
ok mikeb

Obtained from: OpenBSD, henning <henning@openbsd.org>, 5a4ae9a9cb
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D50798

Details

Provenance
kpAuthored on Jun 3 2025, 7:15 AM
Differential Revision
D50798: pf: add a generic packet rate matching filter
Parents
rG53a341d0e445: pf: use counter_rate() for rate checking
Branches
Unknown
Tags
Unknown