summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6/redirect.t.payload.ip6
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py/ip6/redirect.t.payload.ip6')
-rw-r--r--tests/py/ip6/redirect.t.payload.ip619
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/py/ip6/redirect.t.payload.ip6 b/tests/py/ip6/redirect.t.payload.ip6
index 3369a7a3..4e78a244 100644
--- a/tests/py/ip6/redirect.t.payload.ip6
+++ b/tests/py/ip6/redirect.t.payload.ip6
@@ -117,6 +117,14 @@ ip6 test-ip6 output
[ immediate reg 1 0x00007319 ]
[ redir proto_min reg 1 ]
+# ip6 nexthdr tcp redirect to 100-200
+ip6 test-ip6 output
+ [ payload load 1b @ network header + 6 => reg 1 ]
+ [ cmp eq reg 1 0x00000006 ]
+ [ immediate reg 1 0x00006400 ]
+ [ immediate reg 2 0x0000c800 ]
+ [ redir proto_min reg 1 proto_max reg 2 ]
+
# tcp dport 39128 redirect to 993
ip6 test-ip6 output
[ payload load 1b @ network header + 6 => reg 1 ]
@@ -183,3 +191,14 @@ ip6 test-ip6 output
[ lookup reg 1 set map%d dreg 0 ]
[ redir ]
+# ip6 nexthdr 6 redirect to tcp dport map { 22 : 8000, 80 : 8080}
+map%d test-ip6 b
+map%d test-ip6 0
+ element 00001600 : 0000401f 0 [end] element 00005000 : 0000901f 0 [end]
+ip6 test-ip6 output
+ [ payload load 1b @ network header + 6 => reg 1 ]
+ [ cmp eq reg 1 0x00000006 ]
+ [ payload load 2b @ transport header + 2 => reg 1 ]
+ [ lookup reg 1 set map%d dreg 1 ]
+ [ redir proto_min reg 1 ]
+