diff options
author | Florian Westphal <fw@strlen.de> | 2017-03-14 16:55:17 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2017-03-16 10:10:04 +0100 |
commit | 8675f943e7eff24f29aaa492cb58267f9291de31 (patch) | |
tree | dc1907fc65879c7ba7543f198460365be2d7488e /tests/py/ip/objects.t.payload | |
parent | 1ed84c4626973cee92e4a238ad55f7ba1f5af249 (diff) |
tests: py: add ct helper tests
needs minor tweak to nft-test.py so we don't zap the ';' withhin the {}.
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip/objects.t.payload')
-rw-r--r-- | tests/py/ip/objects.t.payload | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/py/ip/objects.t.payload b/tests/py/ip/objects.t.payload index b5cad4d1..6499d363 100644 --- a/tests/py/ip/objects.t.payload +++ b/tests/py/ip/objects.t.payload @@ -29,3 +29,17 @@ ip test-ip4 output [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ objref sreg 1 set __objmap%d id 1 ] + +# ct helper set "cthelp1" +ip test-ip4 output + [ objref type 3 name cthelp1 ] + +# ct helper set tcp dport map {21 : "cthelp1", 2121 : "cthelp1" } +__objmap%d test-ip4 43 +__objmap%d test-ip4 0 + element 00001500 : 0 [end] element 00004908 : 0 [end] +ip test-ip4 output + [ payload load 1b @ network header + 9 => reg 1 ] + [ cmp eq reg 1 0x00000006 ] + [ payload load 2b @ transport header + 2 => reg 1 ] + [ objref sreg 1 set __objmap%d id 1 ] |