path: root/tests/py/inet/sets.t
diff options
authorFlorian Westphal <>2018-05-09 12:18:20 +0200
committerFlorian Westphal <>2018-05-09 12:18:20 +0200
commit2efbdf7b8fcf79f3fa8a6471d2eca00df0c91108 (patch)
treea7020e985b188bd249202594a0ed8cf94f1d829c /tests/py/inet/sets.t
parent71624f25f22b1d750bb532ced75e080b4123fb56 (diff)
tests: py: allow to specify sets with a timeout
Not usable yet, as the set timeout netlink output isn't captured so far, but it adds groundwork to add this as a follow-up. Set definition syntax changes a little, if you want to add multiple elements they now have to be separated by "," just like in nftables. Signed-off-by: Florian Westphal <>
Diffstat (limited to 'tests/py/inet/sets.t')
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/py/inet/sets.t b/tests/py/inet/sets.t
new file mode 100644
index 00000000..8f1cbff7
--- /dev/null
+++ b/tests/py/inet/sets.t
@@ -0,0 +1,18 @@
+:input;type filter hook input priority 0
+:ingress;type filter hook ingress device lo priority 0
+!set1 type ipv4_addr timeout 60s;ok
+?set1 timeout 30s,;ok
+!set2 type ipv6_addr timeout 23d23h59m59s;ok
+?set2 dead::beef timeout 1s;ok
+ip saddr @set1 drop;ok
+ip saddr != @set2 drop;fail
+ip6 daddr != @set2 accept;ok
+ip6 daddr @set1 drop;fail