summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/chains
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-05-23 12:45:06 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-05-23 13:02:28 +0200
commite71e5a7be445e5ae436d62d7a32b3ac755d6ccd5 (patch)
treec60855aa506d00e6c479298ffbbaa76d29cb4842 /tests/shell/testcases/chains
parent4b6fb07de07ad21c7e8e0c78f3f6387a933f3224 (diff)
tests: shell: non-base chain loops
Detect more non-base chain loops. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/chains')
-rwxr-xr-xtests/shell/testcases/chains/0018check_jump_loop_110
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/shell/testcases/chains/0018check_jump_loop_1 b/tests/shell/testcases/chains/0018check_jump_loop_1
new file mode 100755
index 00000000..d1443dab
--- /dev/null
+++ b/tests/shell/testcases/chains/0018check_jump_loop_1
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table ip filter
+$NFT add chain ip filter ap1
+$NFT add chain ip filter ap2
+$NFT add rule ip filter ap1 jump ap2
+# kernel should return EOPNOTSUPP
+$NFT add rule ip filter ap1 jump ap1 2>/dev/null >&2