tests: hash:net,iface.t: check wildcard add and delete
Florian Westphal
maintainerPATCH 1/1 tests: hash:net,iface.t: check wildcard add and delete
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 <[email protected]>
---
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(+)
tests/hash:net,iface.t +7 -0
@@ -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
Signature · 1 line
2.56.0