]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: recent: New kernels support 999 hits
authorPhil Sutter <phil@nwl.cc>
Sat, 20 Jul 2024 00:23:28 +0000 (02:23 +0200)
committerPhil Sutter <phil@nwl.cc>
Sat, 27 Jul 2024 12:32:39 +0000 (14:32 +0200)
Since kernel commit f4ebd03496f6 ("netfilter: xt_recent: Lift
restrictions on max hitcount value"), the max supported hitcount value
has increased significantly. Adjust the test to use a value which fails
on old as well as new kernels.

Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libxt_recent.t

index cf23aabc6e63bdcee832de38c7f15fd3ceb11a59..3b0dd9fa29c9452d433778bce06bcca5b4ed0d4e 100644 (file)
@@ -4,7 +4,7 @@
 -m recent --rcheck --hitcount 12 --name foo --mask 255.255.255.255 --rsource;=;OK
 -m recent --update --rttl;-m recent --update --rttl --name DEFAULT --mask 255.255.255.255 --rsource;OK
 -m recent --set --rttl;;FAIL
--m recent --rcheck --hitcount 999 --name foo --mask 255.255.255.255 --rsource;;FAIL
+-m recent --rcheck --hitcount 65536 --name foo --mask 255.255.255.255 --rsource;;FAIL
 # nonsensical, but all should load successfully:
 -m recent --rcheck --hitcount 3 --name foo --mask 255.255.255.255 --rsource -m recent --rcheck --hitcount 4 --name foo --mask 255.255.255.255 --rsource;=;OK
 -m recent --rcheck --hitcount 4 --name foo --mask 255.255.255.255 --rsource -m recent --rcheck --hitcount 4 --name foo --mask 255.255.255.255 --rsource;=;OK