]> git.ipfire.org Git - thirdparty/iptables.git/commit
extensions: hashlimit: Fix tests with HZ=1000
authorPhil Sutter <phil@nwl.cc>
Mon, 8 Nov 2021 16:03:21 +0000 (17:03 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 23 Nov 2021 13:58:47 +0000 (14:58 +0100)
commit1eab8e83aec0e6965f11f8cad460add1caeae629
tree059effa3e40f6fd2975dc661db2d396ffdc5f019
parentafa525ee81aa799284c35575c945785fa8b82b13
extensions: hashlimit: Fix tests with HZ=1000

In an attempt to fix for failing hashlimit tests with HZ=100, the
expected failures were changed so they are expected to pass and the
parameters changed to seemingly fix them. Yet while the new parameters
worked on HZ=100 systems, with higher tick rates they didn't so the
observed problem moved from the test failing on HZ=100 to failing on
HZ=1000 instead.

Kernel's error message "try lower: 864000000/5" turned out to be a red
herring: The burst value does not act as a dividor but a multiplier
instead, so in order to lower the overflow-checked value, a lower burst
value must be chosen. Inded, using a burst value of 1 makes the kernel
accept the rule in both HZ=100 and HZ=1000 configurations.

Fixes: bef9dc575625a ("extensions: hashlimit: Fix tests with HZ=100")
Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libxt_hashlimit.t