]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: update bad_expression test case
authorFlorian Westphal <fw@strlen.de>
Thu, 17 Aug 2023 18:37:21 +0000 (20:37 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 17 Aug 2023 18:39:20 +0000 (20:39 +0200)
Check that the ruleset also fails to validate if there is
another table that passes validation checks.

Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/testcases/transactions/bad_expression

index df46ceb085d7aa59f6ad13c707d4bdd35a1ceb6f..a820c2b98c3942f1d7b15e00b38eac289d49e2d0 100755 (executable)
@@ -4,6 +4,14 @@
 # nft must return an error.  Also catch nfnetlink retry loops that
 # cause nft or kernel to spin.
 timeout 3 $NFT -f - <<EOF
+table ip t0 {
+       chain c { }
+       chain input {
+               type filter hook input priority 0;
+               jump c
+       }
+}
+
 table ip t1 {
        chain a {
                masquerade
@@ -17,6 +25,7 @@ EOF
 
 rc=$?
 if [ $rc -eq 0 ]; then
+       echo "Ruleset should have failed" 1>&2
        exit 111
 fi