summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6
diff options
context:
space:
mode:
authorShivani Bhardwaj <shivanib134@gmail.com>2016-01-19 00:44:48 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2016-01-31 22:32:18 +0100
commit55e7822dbe8c70d067b63ea8518359639386e7c6 (patch)
treefa34f95d9dfb35d075c462df1cf2a9e8e8567631 /tests/py/ip6
parent9a414a86dd7892f53a767698627a79ebaf284c43 (diff)
ip6: Add tests for icmpv6 packet types
Add tests for the icmpv6 packet types policy-fail and reject-route to be used with REJECT target. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip6')
-rw-r--r--tests/py/ip6/reject.t2
-rw-r--r--tests/py/ip6/reject.t.payload.ip68
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/py/ip6/reject.t b/tests/py/ip6/reject.t
index 29799565..7d21aa8e 100644
--- a/tests/py/ip6/reject.t
+++ b/tests/py/ip6/reject.t
@@ -7,6 +7,8 @@ reject with icmpv6 type no-route;ok
reject with icmpv6 type admin-prohibited;ok
reject with icmpv6 type addr-unreachable;ok
reject with icmpv6 type port-unreachable;ok;reject
+reject with icmpv6 type policy-fail;ok
+reject with icmpv6 type reject-route;ok
reject with tcp reset;ok;ip6 nexthdr 6 reject with tcp reset
reject with icmpv6 type host-unreachable;fail
diff --git a/tests/py/ip6/reject.t.payload.ip6 b/tests/py/ip6/reject.t.payload.ip6
index aa0b9ff2..fcae382b 100644
--- a/tests/py/ip6/reject.t.payload.ip6
+++ b/tests/py/ip6/reject.t.payload.ip6
@@ -18,6 +18,14 @@ ip6 test-ip6 output
ip6 test-ip6 output
[ reject type 0 code 4 ]
+# reject with icmpv6 type policy-fail
+ip6 test-ip6 output
+ [ reject type 0 code 5 ]
+
+# reject with icmpv6 type reject-route
+ip6 test-ip6 output
+ [ reject type 0 code 6 ]
+
# reject with tcp reset
ip6 test-ip6 output
[ payload load 1b @ network header + 6 => reg 1 ]