summaryrefslogtreecommitdiffstats
path: root/tests/regression/any
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regression/any')
-rw-r--r--tests/regression/any/ct.t5
-rw-r--r--tests/regression/any/ct.t.payload36
-rw-r--r--tests/regression/any/meta.t4
-rw-r--r--tests/regression/any/meta.t.payload29
4 files changed, 74 insertions, 0 deletions
diff --git a/tests/regression/any/ct.t b/tests/regression/any/ct.t
index 6ec05261..ab4b167d 100644
--- a/tests/regression/any/ct.t
+++ b/tests/regression/any/ct.t
@@ -105,3 +105,8 @@ ct helper "12345678901234567";fail
# <cmdline>:1:37-39: Error: datatype mismatch, expected invalid, expression has type Internet protocol
# add rule ip test input ct proto-dst udp
# ~~~~~~~~~~~~ ^^^
+
+ct state . ct mark { new . 0x12345678};ok
+ct state . ct mark { new . 0x12345678, new . 0x34127856, established . 0x12785634};ok
+ct direction . ct mark { original . 0x12345678};ok
+ct state . ct mark vmap { new . 0x12345678 : drop};ok
diff --git a/tests/regression/any/ct.t.payload b/tests/regression/any/ct.t.payload
index f77c2842..2e7c1ff7 100644
--- a/tests/regression/any/ct.t.payload
+++ b/tests/regression/any/ct.t.payload
@@ -237,3 +237,39 @@ ip test-ip4 output
[ ct load helper => reg 1 ]
[ cmp eq reg 1 0x00707466 0x00000000 0x00000000 0x00000000 ]
+# ct state . ct mark { new . 0x12345678}
+set%d test 3
+set%d test 0
+ element 00000008 12345678 : 0 [end]
+ip test-ip4 output
+ [ ct load state => reg 1 ]
+ [ ct load mark => reg 9 ]
+ [ lookup reg 1 set set%d ]
+
+# ct state . ct mark { new . 0x12345678, new . 0x34127856, established . 0x12785634}
+set%d test-ip4 3
+set%d test-ip4 0
+ element 00000008 12345678 : 0 [end] element 00000008 34127856 : 0 [end] element 00000002 12785634 : 0 [end]
+ip test-ip4 output
+ [ ct load state => reg 1 ]
+ [ ct load mark => reg 9 ]
+ [ lookup reg 1 set set%d ]
+
+# ct direction . ct mark { original . 0x12345678}
+set%d test 3
+set%d test 0
+ element 00000000 12345678 : 0 [end]
+ip test-ip4 output
+ [ ct load direction => reg 1 ]
+ [ ct load mark => reg 9 ]
+ [ lookup reg 1 set set%d ]
+
+# ct state . ct mark vmap { new . 0x12345678 : drop}
+map%d test-ip4 b
+map%d test-ip4 0
+ element 00000008 12345678 : 0 [end]
+ip test-ip4 output
+ [ ct load state => reg 1 ]
+ [ ct load mark => reg 9 ]
+ [ lookup reg 1 set map%d dreg 0 ]
+
diff --git a/tests/regression/any/meta.t b/tests/regression/any/meta.t
index 24bcafa8..ddb360dd 100644
--- a/tests/regression/any/meta.t
+++ b/tests/regression/any/meta.t
@@ -187,3 +187,7 @@ meta cgroup 1048577-1048578;ok;cgroup 1048577-1048578
meta cgroup != 1048577-1048578;ok;cgroup != 1048577-1048578
meta cgroup {1048577-1048578};ok;cgroup { 1048577-1048578}
# meta cgroup != { 1048577-1048578};ok;cgroup != { 1048577-1048578}
+
+meta iif . meta oif { lo . eth0 };ok
+meta iif . meta oif . meta mark { lo . eth0 . 0x0000000a };ok
+meta iif . meta oif vmap { lo . eth0 : drop };ok
diff --git a/tests/regression/any/meta.t.payload b/tests/regression/any/meta.t.payload
index 921e42e3..0243d808 100644
--- a/tests/regression/any/meta.t.payload
+++ b/tests/regression/any/meta.t.payload
@@ -705,3 +705,32 @@ ip test-ip4 input
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
[ lookup reg 1 set set%d ]
+
+# meta iif . meta oif { lo . eth0 }
+set%d test-ip4 3
+set%d test-ip4 0
+ element 00000001 00000002 : 0 [end]
+ip test-ip4 output
+ [ meta load iif => reg 1 ]
+ [ meta load oif => reg 9 ]
+ [ lookup reg 1 set set%d ]
+
+# meta iif . meta oif . meta mark { lo . eth0 . 0x0000000a }
+set%d test-ip4 3
+set%d test-ip4 0
+ element 00000001 00000002 0000000a : 0 [end]
+ip test-ip4 output
+ [ meta load iif => reg 1 ]
+ [ meta load oif => reg 9 ]
+ [ meta load mark => reg 10 ]
+ [ lookup reg 1 set set%d ]
+
+# meta iif . meta oif vmap { lo . eth0 : drop }
+map%d test-ip4 b
+map%d test-ip4 0
+ element 00000001 00000002 : 0 [end]
+ip test-ip4 output
+ [ meta load iif => reg 1 ]
+ [ meta load oif => reg 9 ]
+ [ lookup reg 1 set map%d dreg 0 ]
+