diff options
author | Florian Westphal <fw@strlen.de> | 2018-05-09 12:18:20 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-05-09 12:18:20 +0200 |
commit | 2efbdf7b8fcf79f3fa8a6471d2eca00df0c91108 (patch) | |
tree | a7020e985b188bd249202594a0ed8cf94f1d829c /tests/py/inet/sets.t.payload.inet | |
parent | 71624f25f22b1d750bb532ced75e080b4123fb56 (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 <fw@strlen.de>
Diffstat (limited to 'tests/py/inet/sets.t.payload.inet')
-rw-r--r-- | tests/py/inet/sets.t.payload.inet | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/py/inet/sets.t.payload.inet b/tests/py/inet/sets.t.payload.inet new file mode 100644 index 00000000..1584fc07 --- /dev/null +++ b/tests/py/inet/sets.t.payload.inet @@ -0,0 +1,17 @@ +# ip saddr @set1 drop +inet test-inet input + [ meta load nfproto => reg 1 ] + [ cmp eq reg 1 0x00000002 ] + [ payload load 4b @ network header + 12 => reg 1 ] + [ lookup reg 1 set set1 ] + [ immediate reg 0 drop ] + +# ip6 daddr != @set2 accept +inet test-inet input + [ meta load nfproto => reg 1 ] + [ cmp eq reg 1 0x0000000a ] + [ payload load 16b @ network header + 24 => reg 1 ] + [ lookup reg 1 set set2 0x1 ] + [ immediate reg 0 accept ] + + |