From: Jozsef Kadlecsik Date: Fri, 30 Dec 2022 11:48:54 +0000 (+0100) Subject: Tests: Verify that hash:net,port,net type can handle 0/0 properly X-Git-Tag: v7.17~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5f904bb385a05ec100eeaebd89343305ffaa1a9;p=thirdparty%2Fipset.git Tests: Verify that hash:net,port,net type can handle 0/0 properly --- diff --git a/tests/hash:net,port,net.t b/tests/hash:net,port,net.t index f5a578ab..2c9516be 100644 --- a/tests/hash:net,port,net.t +++ b/tests/hash:net,port,net.t @@ -52,6 +52,12 @@ 0 ipset add test 10.0.0.0-10.0.3.255,tcp:80-82,192.168.0.0-192.168.2.255 # Check that correct number of elements are added 0 n=`ipset list test|grep '^10.0'|wc -l` && test $n -eq 6 +# Flush set +0 ipset flush test +# Add 0/0 networks +0 ipset add test 0.0.0.0/0,tcp:1-2,192.168.230.128/25 +# Check that correct number of elements are added +0 n=`ipset list test|grep '^0'|wc -l` && test $n -eq 2 # Destroy set 0 ipset -X test # Create test set with timeout support