All of lore.kernel.org
 help / color / mirror / Atom feed
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 2/3] tests: hash:net,iface: timed-out entries must be ignored
Date: Wed, 11 Nov 2026 11:16:02 +0100	[thread overview]
Message-ID: <20261111101603.22698-2-fw@strlen.de> (raw)
In-Reply-To: <20261111101603.22698-1-fw@strlen.de>

When a timed-out entry in a `hash:net,iface` set expires, it should no
longer affect matching: lookups must behave as if the entry had already
been reaped by GC.

As-is, the expired entry continues to shadow the broader one until GC
removes the entry from the set, creating a window where matching is
inconsistent with the entry's logical state.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 Fails on main, but not on rhashtable v8 patches.

 tests/hash:net,iface.t | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/hash:net,iface.t b/tests/hash:net,iface.t
index 6566fb407e81..c4a8de45fced 100644
--- a/tests/hash:net,iface.t
+++ b/tests/hash:net,iface.t
@@ -190,6 +190,8 @@
 0 ipset -T test 1.1.1.3,eth0
 # Check live entry on intermediate /30 net blocks fallthrough to broader eth1 net
 1 ipset -T test 1.1.1.1,eth1
+# Check expired net no longer blocks fallthrough to the broader other-interface net
+0 ipset -T test 9.9.9.1,eth1
 # Delete test set
 0 ipset destroy test
 # Timeout: Check that resizing keeps timeout values
-- 
2.56.0


  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 ` Florian Westphal [this message]
2026-11-11 10:16 ` [PATCH ipset 3/3] tests: hash:net,iface.t: add test for exceeding the same-key bucket list Florian Westphal

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-2-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.