summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2020-10-30 20:36:22 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2020-10-31 12:51:58 +0100
commit673b9d3f2630f812bcef95666a1097747844c92b (patch)
tree73dde2fa391e8e1abd3e5c44b192194b52ae0f8c /tests/shell/testcases
parent501ae116ede467b6c025d81041909b472ab5fc46 (diff)
tests: shell: exercise validation with nft -c
Using oif in fib from prerouting is not support, make sure -c reports an error. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-xtests/shell/testcases/nft-f/0023check_112
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/shell/testcases/nft-f/0023check_1 b/tests/shell/testcases/nft-f/0023check_1
new file mode 100755
index 00000000..42793b6e
--- /dev/null
+++ b/tests/shell/testcases/nft-f/0023check_1
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+RULESET="table ip foo {
+ chain bar {
+ type filter hook prerouting priority 0;
+ }
+}"
+
+$NFT -f - <<< "$RULESET"
+
+$NFT -c add rule foo bar fib saddr . oif type local && exit 1
+exit 0