From a7726d76253778e35ab3848a1fd1ae616c737164 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 12 Jan 2018 10:42:40 +0100 Subject: Add test to verify wraparound fix --- tests/hash:net,port.t | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3