| Message ID | 20261104105810.21171-1-fw@strlen.de |
|---|---|
| State | Accepted, archived |
| Headers | show |
| Series | [ipset] tests: hash:net,iface.t: check wildcard add and delete | expand |
diff --git a/tests/hash:net,iface.t b/tests/hash:net,iface.t index f1a36e33ff8f..9f3d9e36e232 100644 --- a/tests/hash:net,iface.t +++ b/tests/hash:net,iface.t @@ -282,5 +282,12 @@ 0 ipset test test 10.0.5.0/24,eth0 # Test a 2nd, unrelated interface matches the wildcard too. 0 ipset test test 10.0.5.0/24,eth1 +0 ipset flush test +# Add a wildcard-flagged element +0 ipset add test 10.0.6.0/24,eth wildcard +# Delete the element. ipset del does not expose a wildcard flag +0 ipset del test 10.0.6.0/24,eth +# Check the wildcard element was removed +1 ipset test test 10.0.6.0/24,eth1 0 ipset destroy test # eof
The existing implementation allows to delete an element that was added with wildcard flag provided the key matches. Check kernel doesn't require a wildcard flag to delete the element. Signed-off-by: Florian Westphal <fw@strlen.de> --- One more quirk worth testing for: check we can remove an element that had wildcard flag applied to it. tests/hash:net,iface.t | 7 +++++++ 1 file changed, 7 insertions(+)