summaryrefslogtreecommitdiffstats
path: root/tests/regression/ip/ip.t.payload.inet
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-09-03 18:23:18 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-09-11 20:05:47 +0200
commitb716c2b48a77fd0c01be128d704d9cd2cd5243b3 (patch)
tree04d72a0577d2fa793ecddf34db362c290bdb0e25 /tests/regression/ip/ip.t.payload.inet
parent4bfcee9847fa4d45685638cb505782bcd6ee2853 (diff)
tests: add concatenations and maps; combine them too
This patch adds simple tests for concatenation and maps, including more advanced tests that combine them. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/regression/ip/ip.t.payload.inet')
-rw-r--r--tests/regression/ip/ip.t.payload.inet12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/regression/ip/ip.t.payload.inet b/tests/regression/ip/ip.t.payload.inet
index dbc7852b..4caea1e3 100644
--- a/tests/regression/ip/ip.t.payload.inet
+++ b/tests/regression/ip/ip.t.payload.inet
@@ -465,3 +465,15 @@ inet test-inet input
[ bitwise reg 1 = (reg=1 & 0x0000ffff ) ^ 0x00000000 ]
[ cmp eq reg 1 0x0000ffff ]
+# ip saddr . ip daddr . ip protocol { 1.1.1.1 . 2.2.2.2 . tcp, 1.1.1.1 . 3.3.3.3 . udp}
+set%d test-ip 3
+set%d test-ip 0
+ element 01010101 02020202 00000006 : 0 [end] element 01010101 03030303 00000011 : 0 [end]
+inet test-ip input
+ [ meta load nfproto => reg 1 ]
+ [ cmp eq reg 1 0x00000002 ]
+ [ payload load 4b @ network header + 12 => reg 1 ]
+ [ payload load 4b @ network header + 16 => reg 9 ]
+ [ payload load 1b @ network header + 9 => reg 10 ]
+ [ lookup reg 1 set set%d ]
+