path: root/tests/hash:ip.t
diff options
authorJozsef Kadlecsik <>2011-03-27 21:01:33 +0200
committerJozsef Kadlecsik <>2011-03-27 21:01:33 +0200
commitbdd5135826516d4109922b0d8c61f8d200184f82 (patch)
treeb221fe881671679b14cd30bc26a9137ff7a69e62 /tests/hash:ip.t
parent29b83847687dcefe59b42056a80f1b0929efcd6e (diff)
Timeout can be modified for already added elements
When an element to a set with timeout added, one can change the timeout by "readding" the element with the "-exist" flag. That means the timeout value is reset to the specified one (or to the default from the set specification if the "timeout n" option is not used). Example ipset add foo timeout 10 ipset add foo timeout 600 -exist
Diffstat (limited to 'tests/hash:ip.t')
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/hash:ip.t b/tests/hash:ip.t
index a054751..ce8b14b 100644
--- a/tests/hash:ip.t
+++ b/tests/hash:ip.t
@@ -96,6 +96,14 @@
0 diff -I 'Size in memory.*' .foo hash:ip.t.list1 && rm .foo
# Network: Flush test set
0 ipset -F test
+# Network: add element with 1s timeout
+0 ipset add test timeout 1
+# Network: readd element with 3s timeout
+0 ipset add test timeout 3 -exist
+# Network: sleep 2s
+0 sleep 2s
+# Network: check readded element
+0 ipset test test
# Network: Delete test set
0 ipset -X test
# eof