summaryrefslogtreecommitdiffstats
path: root/tests/py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py')
-rw-r--r--tests/py/any/ct.t1
-rw-r--r--tests/py/any/ct.t.payload7
-rw-r--r--tests/py/inet/ct.t10
-rw-r--r--tests/py/inet/ct.t.payload13
4 files changed, 23 insertions, 8 deletions
diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t
index 275d2e71..f02bd042 100644
--- a/tests/py/any/ct.t
+++ b/tests/py/any/ct.t
@@ -96,7 +96,6 @@ ct bytes original reply;fail
# missing direction
ct saddr 1.2.3.4;fail
-meta nfproto ipv4 ct original saddr 1.2.3.4;ok
# wrong base (ip6 but ipv4 address given)
meta nfproto ipv6 ct original saddr 1.2.3.4;fail
diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload
index 80513c80..20acbb9b 100644
--- a/tests/py/any/ct.t.payload
+++ b/tests/py/any/ct.t.payload
@@ -373,13 +373,6 @@ ip test-ip4 output
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
[ cmp lt reg 1 0x00000000 0xf4010000 ]
-# meta nfproto ipv4 ct original saddr 1.2.3.4
-ip test-ip4 output
- [ meta load nfproto => reg 1 ]
- [ cmp eq reg 1 0x00000002 ]
- [ ct load src => reg 1 , dir original ]
- [ cmp eq reg 1 0x04030201 ]
-
# ct status expected,seen-reply,assured,confirmed,snat,dnat,dying
ip test-ip4 output
[ ct load status => reg 1 ]
diff --git a/tests/py/inet/ct.t b/tests/py/inet/ct.t
new file mode 100644
index 00000000..c56c3bc8
--- /dev/null
+++ b/tests/py/inet/ct.t
@@ -0,0 +1,10 @@
+:input;type filter hook input priority 0
+:ingress;type filter hook ingress device lo priority 0
+
+*inet;test-inet;input
+
+meta nfproto ipv4 ct original saddr 1.2.3.4;ok
+meta nfproto ipv6 ct original saddr ::1;ok
+
+# missing protocol context
+ct original saddr ::1;fail
diff --git a/tests/py/inet/ct.t.payload b/tests/py/inet/ct.t.payload
new file mode 100644
index 00000000..21c74581
--- /dev/null
+++ b/tests/py/inet/ct.t.payload
@@ -0,0 +1,13 @@
+# meta nfproto ipv4 ct original saddr 1.2.3.4
+ip test-ip4 output
+ [ meta load nfproto => reg 1 ]
+ [ cmp eq reg 1 0x00000002 ]
+ [ ct load src => reg 1 , dir original ]
+ [ cmp eq reg 1 0x04030201 ]
+
+# meta nfproto ipv6 ct original saddr ::1
+inet test-inet input
+ [ meta load nfproto => reg 1 ]
+ [ cmp eq reg 1 0x0000000a ]
+ [ ct load src => reg 1 , dir original ]
+ [ cmp eq reg 1 0x00000000 0x00000000 0x00000000 0x01000000 ]