False-positive AI review of rhashtable patch set: Does this early return change the matching semantics of hash:net,iface when only physdev differs? The old hash_netiface4_data_equal() evaluated (++*multi) after the ip and cidr compares but before the physdev compare. An element with the same ip/cidr but a different physdev therefore set the stop flag, and mtype_test_cidrs() did not widen to a broader prefix. physdev is part of hash key, so such a 'stop' would only fire with very rare hash bucket collisions, it is not intended behavior. Signed-off-by: Florian Westphal --- Passes on nf:main. tests/hash:net,iface.t | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/hash:net,iface.t b/tests/hash:net,iface.t index 03fc70f12605..dee09f517b23 100644 --- a/tests/hash:net,iface.t +++ b/tests/hash:net,iface.t @@ -372,4 +372,18 @@ 0 ipset list test | grep -q -F '192.0.' || echo -n "Notice: expected at least one new 192. element" # Full set with forceadd: destroy set 0 ipset destroy test +# physdev match: create a set +0 ipset create test hash:net,iface +# physdev match: add /24 physdev element +0 ipset add test 10.0.0.0/24,physdev:eth0 +# physdev match: add broader /16 non-physdev element +0 ipset add test 10.0.0.0/16,eth0 +# physdev match: /24 gets widened to /16 +0 ipset test test 10.0.0.1,eth0 +# physdev match: the physdev lookup itself matches +0 ipset test test 10.0.0.1,physdev:eth0 +# physdev match: address outside the /24 still matches the /16 +0 ipset test test 10.0.1.1,eth0 +# physdev match: destroy set +0 ipset destroy test # eof -- 2.56.1