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 <pa...@netfilter.org>
---
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to