diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2018-01-12 10:42:40 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2018-01-12 10:42:40 +0100 |
commit | a7726d76253778e35ab3848a1fd1ae616c737164 (patch) | |
tree | ec2dd7bb3dd99916e3b67d0c3b4b4c72e03b2eff /tests/hash:net,port.t | |
parent | 82403f9c229f093e973888e778646b4206a1469f (diff) |
Add test to verify wraparound fix
Diffstat (limited to 'tests/hash:net,port.t')
-rw-r--r-- | tests/hash:net,port.t | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/hash:net,port.t b/tests/hash:net,port.t index 3c154f9..5424ff7 100644 --- a/tests/hash:net,port.t +++ b/tests/hash:net,port.t @@ -74,6 +74,12 @@ 0 ipset add test 10.0.0.0-10.0.2.255,tcp:80-1105 # Check that correct number of elements are added 0 n=`ipset list test|grep '^10.0'|wc -l` && test $n -eq 2052 +# Flush set +0 ipset flush test +# Add range to verify wraparound does not happen +0 ipset add test 255.255.255.253-255.255.255.255,tcp:65534-65535 +# Check that correct number of elements are added +0 n=`ipset list test|grep '^255.255.255'|wc -l` && test $n -eq 4 # Destroy set 0 ipset -X test # Create test set with timeout support |