diff options
author | Jozsef Kadlecsik <kadlec@netfilter.org> | 2022-12-30 12:48:54 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@netfilter.org> | 2022-12-30 12:48:54 +0100 |
commit | d5f904bb385a05ec100eeaebd89343305ffaa1a9 (patch) | |
tree | 4dcc3882cc396b1ade050959b18d7ee8d99ea5a5 /tests | |
parent | 3d31b792e3a953e9a6ff0a7dc259c9c993847dc3 (diff) |
Tests: Verify that hash:net,port,net type can handle 0/0 properly
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hash:net,port,net.t | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/hash:net,port,net.t b/tests/hash:net,port,net.t index f5a578a..2c9516b 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 |