summaryrefslogtreecommitdiffstats
path: root/tests/shell
diff options
context:
space:
mode:
authorVarsha Rao <rvarsha016@gmail.com>2017-10-11 10:11:37 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2017-10-17 14:01:48 +0200
commitd11ef6ed2ac29fcd0e7ceccc72298d53f40d8c28 (patch)
treef32149f330e83efd2daaeea0f5e28b4dc9072163 /tests/shell
parentdf46c412f3ade7d2b5cc823ac307e7ac432c8873 (diff)
tests: shell: Add test case for jump chain.
This patch adds test case for checking jump to non existing chain. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell')
-rwxr-xr-xtests/shell/testcases/chains/0015check_jump_loop_111
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/shell/testcases/chains/0015check_jump_loop_1 b/tests/shell/testcases/chains/0015check_jump_loop_1
new file mode 100755
index 00000000..ba40ddb9
--- /dev/null
+++ b/tests/shell/testcases/chains/0015check_jump_loop_1
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table t
+$NFT add chain t c1
+$NFT add chain t c2
+$NFT add t c1 jump c2
+# kernel should return ENOENT
+$NFT add t c2 ip daddr vmap { 1 : jump c3 }
+echo "E: Jumped to non existing chain" >&2