[PATCH nft] tests: shell: validate too deep jumpstack from basechain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
I'm dropping this patch: http://patchwork.ozlabs.org/patch/953389/,
validation is not correct as deleting a chain doesn't update the chain
level as Taehee reported.

 tests/shell/testcases/chains/0002jumps_1 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/shell/testcases/chains/0002jumps_1 b/tests/shell/testcases/chains/0002jumps_1
index 0cc89288670e..4d163b05fe1b 100755
--- a/tests/shell/testcases/chains/0002jumps_1
+++ b/tests/shell/testcases/chains/0002jumps_1
@@ -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
-- 
2.11.0


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux