]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: validate too deep jumpstack from basechain
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 8 Aug 2018 19:52:50 +0000 (21:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 8 Aug 2018 19:57:24 +0000 (21:57 +0200)
If there is no basechain, the validation is never exercised.

Too deep nested chains are fine as long as they are not connected to a
basechain.

Update test to add a basechain so we exercise validation.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/testcases/chains/0002jumps_1

index 0cc89288670eda69833f3adb51f29a9c1ddcdb1d..4d163b05fe1b91c8434f348205ac6da6127697b0 100755 (executable)
@@ -6,7 +6,9 @@ MAX_JUMPS=16
 
 $NFT add table t
 
-for i in $(seq 1 $MAX_JUMPS)
+$NFT add chain t c1 { type filter hook input priority 0\; }
+
+for i in $(seq 2 $MAX_JUMPS)
 do
        $NFT add chain t c${i}
 done