From bdd5135826516d4109922b0d8c61f8d200184f82 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sun, 27 Mar 2011 21:01:33 +0200 Subject: 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 1.2.3.4 timeout 10 ipset add foo 1.2.3.4 timeout 600 -exist --- tests/macipmap.t | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/macipmap.t') diff --git a/tests/macipmap.t b/tests/macipmap.t index ddc1393..7332f75 100644 --- a/tests/macipmap.t +++ b/tests/macipmap.t @@ -130,6 +130,14 @@ 0 diff -I 'Size in memory.*' .foo macipmap.t.list2 && rm .foo # Range: Flush test set 0 ipset -F test +# Range: add element with 1s timeout +0 ipset add test 2.0.200.214,00:11:22:33:44:57 timeout 1 +# Range: readd element with 3s timeout +0 ipset add test 2.0.200.214,00:11:22:33:44:57 timeout 3 -exist +# Range: sleep 2s +0 sleep 2s +# Range: check readded element +0 ipset test test 2.0.200.214 # Range: Delete test set 0 ipset -X test # eof -- cgit v1.2.3