summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu>2008-10-23 17:24:30 +0000
committer/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu>2008-10-23 17:24:30 +0000
commit46fb717308d9d717439badd48c150e32a3508a90 (patch)
tree3a6e1fcaca1b4b7e9a4e8353bb3f3b3db0f2c737 /tests
parentfac5288ad80b7ca2f23d1d5acf6ced98a61fd8eb (diff)
ipset 2.4.2:
- When flushing a nethash/ipportnethash type of set, it can lead to a kernel crash due to a wrong type declaration, bug reported by Krzysztof Oledzki. - iptree and iptreemap types require the header file linux/timer.h, also reported by Krzysztof Oledzki.
Diffstat (limited to 'tests')
-rw-r--r--tests/iphash.t6
-rw-r--r--tests/ipmap.t12
-rw-r--r--tests/ipporthash.t6
-rw-r--r--tests/ipportiphash.t6
-rw-r--r--tests/ipportnethash.t6
-rw-r--r--tests/iptree.t6
-rw-r--r--tests/iptreemap.t2
-rw-r--r--tests/macipmap.t6
-rw-r--r--tests/nethash.t2
-rw-r--r--tests/portmap.t6
-rw-r--r--tests/setlist.t4
11 files changed, 52 insertions, 10 deletions
diff --git a/tests/iphash.t b/tests/iphash.t
index 731457d..46ce58b 100644
--- a/tests/iphash.t
+++ b/tests/iphash.t
@@ -14,12 +14,16 @@
0 ipset -T test 192.168.68.69
# IP: Test value not added to the set
1 ipset -T test 2.0.0.2
+# IP: Flush test set
+0 ipset -F test
# IP: Delete test set
0 ipset -X test
# IP: Restore values so that rehashing is triggered
0 ipset -R < iphash.t.restore
# IP: Check that all values are restored
0 (egrep -v '#|-N' iphash.t.restore | sort > .foo.1) && (ipset -S test | egrep -v '#|-N' | sort > .foo.2) && cmp .foo.1 .foo.2 && rm .foo.*
+# IP: Flush test set
+0 ipset -F test
# IP: Delete test set
0 ipset -X test
# Network: Create a set
@@ -34,6 +38,8 @@
0 ipset -T test 192.168.68.95
# Network: Test value not added to the set
1 ipset -T test 2.0.1.0
+# Network: Flush test set
+0 ipset -F test
# Network: Delete test set
0 ipset -X test
# eof
diff --git a/tests/ipmap.t b/tests/ipmap.t
index fea8389..58b913a 100644
--- a/tests/ipmap.t
+++ b/tests/ipmap.t
@@ -20,7 +20,9 @@
1 ipset -A test 2.0.0.0
# Range: Try to add value after upper boundary
1 ipset -A test 2.1.0.1
-# Range: Delete test test
+# Range: Flush test set
+0 ipset -F test
+# Range: Delete test set
0 ipset -X test
# Network: Try to create a set from an invalid network
2 ipset -N test ipmap --network 2.0.0.0/15
@@ -44,7 +46,9 @@
1 ipset -A test 1.255.255.255
# Network: Try to add value after upper boundary
1 ipset -A test 2.1.0.0
-# Network: Delete test test
+# Network: Flush test set
+0 ipset -F test
+# Network: Delete test set
0 ipset -X test
# Subnets: Create a set to store networks
0 ipset -N test ipmap --network 10.0.0.0/8 --netmask 24
@@ -66,7 +70,9 @@
1 ipset -A test 9.255.255.255
# Subnets: Try to add value after upper boundary
1 ipset -A test 11.0.0.0
-# Subnets: Delete test test
+# Subnets: FLush test set
+0 ipset -F test
+# Subnets: Delete test set
0 ipset -X test
# Full: Create full IPv4 space with /16 networks
0 ipset -N test ipmap --network 0.0.0.0/0 --netmask 16
diff --git a/tests/ipporthash.t b/tests/ipporthash.t
index fe246a3..4db4bf3 100644
--- a/tests/ipporthash.t
+++ b/tests/ipporthash.t
@@ -26,7 +26,9 @@
1 ipset -A test 2.0.0.0,5
# Range: Try to add value after upper boundary
1 ipset -A test 2.1.0.1,128
-# Range: Delete test test
+# Range: Flush test set
+0 ipset -F test
+# Range: Delete test set
0 ipset -X test
# Network: Try to create a set from an invalid network
2 ipset -N test ipporthash --network 2.0.0.0/15
@@ -52,6 +54,8 @@
1 ipset -A test 1.255.255.255,5
# Network: Try to add value after upper boundary
1 ipset -A test 2.1.0.0,128
+# Network: Flush test set
+0 ipset -F test
# Network: Delete test set
0 ipset -X test
# eof
diff --git a/tests/ipportiphash.t b/tests/ipportiphash.t
index 058b706..2b38667 100644
--- a/tests/ipportiphash.t
+++ b/tests/ipportiphash.t
@@ -28,7 +28,9 @@
1 ipset -A test 2.0.0.0,5,1.1.1.1
# Range: Try to add value after upper boundary
1 ipset -A test 2.1.0.1,128,2.2.2.2
-# Range: Delete test test
+# Range: Flush test set
+0 ipset -F test
+# Range: Delete test set
0 ipset -X test
# Network: Try to create a set from an invalid network
2 ipset -N test ipportiphash --network 2.0.0.0/15
@@ -54,6 +56,8 @@
1 ipset -A test 1.255.255.255,5,1.1.1.1
# Network: Try to add value after upper boundary
1 ipset -A test 2.1.0.0,128,2.2.2.2
+# Network: Flush test set
+0 ipset -F test
# Network: Delete test set
0 ipset -X test
# eof
diff --git a/tests/ipportnethash.t b/tests/ipportnethash.t
index 18e89a1..35cb9fc 100644
--- a/tests/ipportnethash.t
+++ b/tests/ipportnethash.t
@@ -28,7 +28,9 @@
1 ipset -A test 2.0.0.0,5,1.1.1.1/24
# Range: Try to add value after upper boundary
1 ipset -A test 2.1.0.1,128,2.2.2.2/12
-# Range: Delete test test
+# Range: Flush test set
+0 ipset -F test
+# Range: Delete test set
0 ipset -X test
# Network: Try to create a set from an invalid network
2 ipset -N test ipportnethash --network 2.0.0.0/15
@@ -54,6 +56,8 @@
1 ipset -A test 1.255.255.255,5,1.1.1.1/24
# Network: Try to add value after upper boundary
1 ipset -A test 2.1.0.0,128,2.2.2.2/12
+# Network: Flush test set
+0 ipset -F test
# Network: Delete test set
0 ipset -X test
# eof
diff --git a/tests/iptree.t b/tests/iptree.t
index 0e661ce..746baed 100644
--- a/tests/iptree.t
+++ b/tests/iptree.t
@@ -12,7 +12,9 @@
1 ipset -T test 2.0.0.2
# Static: Test value not added to the set
1 ipset -T test 192.168.68.70
-# Static: Delete test test
+# Static: Flush test set
+0 ipset -F test
+# Static: Delete test set
0 ipset -X test
# Timeout: Create a set with a timeout parameter
0 ipset -N test iptree --timeout 5
@@ -46,6 +48,8 @@
0 sleep 4
# Timeout: Test entry added with 3s timeout
1 ipset -T test 2.0.0.2
+# Timeout: Flush test set
+0 ipset -F test
# Timeout: Delete test set
0 ipset -X test
# eof
diff --git a/tests/iptreemap.t b/tests/iptreemap.t
index 66ee325..b563522 100644
--- a/tests/iptreemap.t
+++ b/tests/iptreemap.t
@@ -46,6 +46,8 @@
0 ipset -T test 192.168.68.67
# Test element after upper bound of deleted network
0 ipset -T test 192.168.68.72
+# Flush test set
+0 ipset -F test
# Delete test set
0 ipset -X test
# eof
diff --git a/tests/macipmap.t b/tests/macipmap.t
index 049eaee..a498a4f 100644
--- a/tests/macipmap.t
+++ b/tests/macipmap.t
@@ -26,7 +26,9 @@
1 ipset -T test 2.0.0.2,00:11:22:33:44:56
# Range: Test value with valid MAC
0 ipset -T test 2.0.0.2,00:11:22:33:44:55
-# Range: Delete test test
+# Range: Flush test set
+0 ipset -F test
+# Range: Delete test set
0 ipset -X test
# Network: Try to create a set from an invalid network
2 ipset -N test macipmap --network 2.0.0.0/15
@@ -50,6 +52,8 @@
1 ipset -A test 1.255.255.255
# Network: Try to add value after upper boundary
1 ipset -A test 2.1.0.0
+# Network: Flush test set
+0 ipset -F test
# Network: Delete test set
0 ipset -X test
# eof
diff --git a/tests/nethash.t b/tests/nethash.t
index bcb873b..0011216 100644
--- a/tests/nethash.t
+++ b/tests/nethash.t
@@ -16,6 +16,8 @@
1 ipset -T test 2.0.1.0
# Try to add IP address
2 ipset -A test 2.0.0.1
+# Flush test set
+0 ipset -F test
# Delete test set
0 ipset -X test
# eof
diff --git a/tests/portmap.t b/tests/portmap.t
index e616f15..299877a 100644
--- a/tests/portmap.t
+++ b/tests/portmap.t
@@ -18,7 +18,9 @@
1 ipset -A test 0
# Range: Try to add value after upper boundary
1 ipset -A test 1025
-# Range: Delete test test
+# Range: Flush test set
+0 ipset -F test
+# Range: Delete test set
0 ipset -X test
# Full: Create a full set of ports
0 ipset -N test portmap --from 0 --to 65535
@@ -32,6 +34,8 @@
0 ipset -T test 65535
# Full: Test value not added to the set
1 ipset -T test 1
+# Full: Flush test set
+0 ipset -F test
# Full: Delete test set
0 ipset -X test
# eof
diff --git a/tests/setlist.t b/tests/setlist.t
index 785dc13..183a7ab 100644
--- a/tests/setlist.t
+++ b/tests/setlist.t
@@ -26,6 +26,8 @@
1 ipset -D test foo,after,bar
# Setlist: Delete bar,after,foo
0 ipset -D test bar,after,foo
-# Setlist: Delete test test
+# Setlist: Flush test set
+0 ipset -F test
+# Setlist: Delete test set
0 ipset -X test
# eof