summaryrefslogtreecommitdiffstats
path: root/tests/py/any/ct.t.payload
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-03-09 12:23:00 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-03-09 13:31:41 +0100
commit0d4b200672c8a46cf06210afc8c72cb12af632b8 (patch)
treebf472be8e8da60d2b150b8170bbb323c5b81a002 /tests/py/any/ct.t.payload
parentf865c417ad5ac4f81e39bb0dfef514fb90f1605d (diff)
parser_bison: allow 'snat' and 'dnat' keywords from the right-hand side
Parse 'snat' and 'dnat' reserved keywords from the right-hand side as symbols. Thus, we can use them as values from ct status. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=950 Reported-by: Ana Rey <anarey@gmail.com> Reported-by: Karol Babioch <karol@babioch.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/any/ct.t.payload')
-rw-r--r--tests/py/any/ct.t.payload19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload
index ac99429c..62e92592 100644
--- a/tests/py/any/ct.t.payload
+++ b/tests/py/any/ct.t.payload
@@ -304,3 +304,22 @@ ip test-ip4 output
[ ct load bytes => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
[ cmp gt reg 1 0x00000000 0xa0860100 ]
+
+# ct status expected,seen-reply,assured,confirmed,snat,dnat,dying
+ip test-ip4 output
+ [ ct load status => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x0000023f ) ^ 0x00000000 ]
+ [ cmp neq reg 1 0x00000000 ]
+
+# ct status snat
+ip test-ip4 output
+ [ ct load status => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00000010 ) ^ 0x00000000 ]
+ [ cmp neq reg 1 0x00000000 ]
+
+# ct status dnat
+ip test-ip4 output
+ [ ct load status => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00000020 ) ^ 0x00000000 ]
+ [ cmp neq reg 1 0x00000000 ]
+