From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>, Florian Westphal <fw@strlen.de>
Subject: [PATCH ipset 3/3] tests: hash:net,iface.t: add test for exceeding the same-key bucket list
Date: Wed, 11 Nov 2026 11:16:03 +0100 [thread overview]
Message-ID: <20261111101603.22698-3-fw@strlen.de> (raw)
In-Reply-To: <20261111101603.22698-1-fw@strlen.de>
flush, add 63 duplicate keys again (should work), then add entry 64
(should fail).
This test fails before the rhashtable conversion, the old hash
implementation did not reset h->bucketsize on flush, so post-flush
next duplicate key immediately hits 'set full' error due to the
refusal to expand the bucket further.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
Fails on main, but not on rhashtable v8 patches.
tests/hash:net,iface.t | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/hash:net,iface.t b/tests/hash:net,iface.t
index c4a8de45fced..0386cc7b7921 100644
--- a/tests/hash:net,iface.t
+++ b/tests/hash:net,iface.t
@@ -134,8 +134,12 @@
0 n=`ipset list test | grep -v Revision: | wc -l` && test $n -eq 71
# Flush test set
0 ipset flush test
+# Add clashing elements after flush
+0 (set -e; for x in `seq 0 63`; do ipset add test 10.0.0.0/16,eth$x; done)
+# Check listing
+0 n=`ipset list test | grep -v Revision: | wc -l` && test $n -eq 71
# Try to add more than 64 clashing entries
-1 (set -e; for x in `seq 0 64`; do ipset add test 10.0.0.0/16,eth$x; done)
+1 ipset add test 10.0.0.0/16,eth64
# Delete test set
0 ipset destroy test
# Check all possible CIDR values
--
2.56.0
prev parent reply other threads:[~2026-11-11 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 10:16 [PATCH ipset 1/3] tests: hash:net,iface: cover cross-iface narrow-net fallthrough blocking Florian Westphal
2026-11-11 10:16 ` [PATCH ipset 2/3] tests: hash:net,iface: timed-out entries must be ignored Florian Westphal
2026-11-11 10:16 ` Florian Westphal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111101603.22698-3-fw@strlen.de \
--to=fw@strlen.de \
--cc=kadlec@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.