]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: more chain dependency validation
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 23 May 2018 10:08:02 +0000 (12:08 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 23 May 2018 10:11:44 +0000 (12:11 +0200)
More exercising for the chain dependency validation.

Reported-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/testcases/chains/0017masquerade_jump_1 [new file with mode: 0755]

diff --git a/tests/shell/testcases/chains/0017masquerade_jump_1 b/tests/shell/testcases/chains/0017masquerade_jump_1
new file mode 100755 (executable)
index 0000000..a57675f
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table t
+$NFT add chain t input {type filter hook input priority 4 \; }
+$NFT add chain t c1
+$NFT add rule t input jump c1
+# kernel should return EOPNOTSUPP
+$NFT add rule t c1 masquerade 2>/dev/null >&2