netfilter: xt_recent: Lift restrictions on max hitcount value
authorPhil Sutter <phil@nwl.cc>
Wed, 26 Jun 2024 22:35:05 +0000 (00:35 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 28 Jun 2024 15:57:50 +0000 (17:57 +0200)
commitf4ebd03496f6b67940b0af92ce885c1d0dc9e121
tree45fe54d81b1e9bae865fff7a24f1755e1789096d
parent742ad979f500c7707258b368c413c7215af09ed5
netfilter: xt_recent: Lift restrictions on max hitcount value

Support tracking of up to 65535 packets per table entry instead of just
255 to better facilitate longer term tracking or higher throughput
scenarios.

Note how this aligns sizes of struct recent_entry's 'nstamps' and
'index' fields when 'nstamps' was larger before. This is unnecessary as
the value of 'nstamps' grows along with that of 'index' after being
initialized to 1 (see recent_entry_update()). Its value will thus never
exceed that of 'index' and therefore does not need to provide space for
larger values.

Requested-by: Fabio <pedretti.fabio@gmail.com>
Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1745
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_recent.c