summaryrefslogtreecommitdiffstats
path: root/tests/hash:mac.t
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/hash:mac.t
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/hash:mac.t')
-rw-r--r--tests/hash:mac.t18
1 files changed, 18 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