]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
test: Make sure no more than 64 clashing elements can be added to hash:net,iface...
authorJozsef Kadlecsik <kadlec@netfilter.org>
Mon, 21 Nov 2022 12:20:05 +0000 (13:20 +0100)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Mon, 21 Nov 2022 12:20:05 +0000 (13:20 +0100)
tests/hash:net,iface.t

index e594ccaff796d61ffe0b8cabe51e6ed0ad1c077e..444f230a77f39ff27a93f96d156d9733bda8769d 100644 (file)
 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
+# Flush test set
+0 ipset flush test
+# 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)
 # Delete test set
 0 ipset destroy test
 # Check all possible CIDR values