summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-09-23 11:10:12 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-09-23 11:10:12 +0200
commitd5927a73000ca784623feeab2b73facbd7fca3b0 (patch)
treeb25aa872a10874d314eb7899a36ec6ea84b6c315 /tests
parent4170be5fa40846f6047d3fb21881d49abcfc08d1 (diff)
Support updating extensions when the set is full
When the set was full (hash type and maxelem reached), it was not possible to update the extension part of already existing elements. The patch removes this limitation. (Fixes netfilter bugzilla id 880.)
Diffstat (limited to 'tests')
-rw-r--r--tests/hash:mac.t18
-rw-r--r--tests/hash:mac.t.list38
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/hash:mac.t b/tests/hash:mac.t
index 25739da..f7023d0 100644
--- a/tests/hash:mac.t
+++ b/tests/hash:mac.t
@@ -50,4 +50,22 @@
0 diff -u -I 'Size in memory.*' .foo hash:mac.t.list1
# MAC: Destroy test set
0 ipset -X test
+# MAC: Create a set with small maxelem parameter
+0 ipset n test hash:mac maxelem 2 skbinfo
+# MAC: Add first element
+0 ipset a test 1:2:3:4:5:6 skbprio 1:10
+# MAC: Add second element
+0 ipset a test 1:2:3:4:5:7 skbprio 1:11
+# MAC: Add third element
+1 ipset a test 1:2:3:4:5:8 skbprio 1:12
+# MAC: Add second element again
+1 ipset a test 1:2:3:4:5:7 skbprio 1:11
+# MAC: Add second element with another extension value
+0 ipset -! a test 1:2:3:4:5:7 skbprio 1:12 skbqueue 8
+# MAC: List set
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
+# MAC: Check listing
+0 diff -u -I 'Size in memory.*' .foo hash:mac.t.list3
+# MAC: Destroy test set
+0 ipset x test
# eof
diff --git a/tests/hash:mac.t.list3 b/tests/hash:mac.t.list3
new file mode 100644
index 0000000..2253a34
--- /dev/null
+++ b/tests/hash:mac.t.list3
@@ -0,0 +1,8 @@
+Name: test
+Type: hash:mac
+Header: hashsize 1024 maxelem 2 skbinfo
+Size in memory: 16792
+References: 0
+Members:
+01:02:03:04:05:06 skbprio 1:10
+01:02:03:04:05:07 skbprio 1:12 skbqueue 8