diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-12-28 13:07:43 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-01-03 20:53:37 +0100 |
commit | 19fd6ae16cbc61a34f046accf3e6076d8b1128e6 (patch) | |
tree | d8c1f57711e24b88a919a92f3efdd0afd1349f67 /tests | |
parent | 5ae62260db2f55b51daeef59a8c197d020e89252 (diff) |
tests: py: check set value from selector and map
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/py/any/ct.t | 2 | ||||
-rw-r--r-- | tests/py/any/ct.t.payload | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t index 059402e2..d4022525 100644 --- a/tests/py/any/ct.t +++ b/tests/py/any/ct.t @@ -56,6 +56,8 @@ ct mark set 0x11 xor 0x1331;ok;ct mark set 0x00001320 ct mark set 0x11333 and 0x11;ok;ct mark set 0x00000011 ct mark set 0x12 or 0x11;ok;ct mark set 0x00000013 ct mark set 0x11;ok;ct mark set 0x00000011 +ct mark set mark;ok;ct mark set mark +ct mark set mark map { 1 : 10, 2 : 20, 3 : 30 };ok;ct mark set mark map { 0x00000003 : 0x0000001e, 0x00000002 : 0x00000014, 0x00000001 : 0x0000000a} ct expiration 30;ok;ct expiration 30s ct expiration 22;ok;ct expiration 22s diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload index 2bebaccd..651b6449 100644 --- a/tests/py/any/ct.t.payload +++ b/tests/py/any/ct.t.payload @@ -273,3 +273,16 @@ ip test-ip4 output [ ct load mark => reg 9 ] [ lookup reg 1 set map%d dreg 0 ] +# ct mark set mark +ip test-ip4 output + [ meta load mark => reg 1 ] + [ ct set mark with reg 1 ] + +# ct mark set mark map { 1 : 10, 2 : 20, 3 : 30 } +map%d test-ip4 b +map%d test-ip4 0 + element 00000001 : 0000000a 0 [end] element 00000002 : 00000014 0 [end] element 00000003 : 0000001e 0 [end] +ip test-ip4 output + [ meta load mark => reg 1 ] + [ lookup reg 1 set map%d dreg 1 ] + [ ct set mark with reg 1 ] |