Blame SOURCES/0049-tests-shell-validate-too-deep-jumpstack-from-basecha.patch

bacbc8
From 62e3a8f9d4246bc491d0b4aa11b250ed8ad06ecc Mon Sep 17 00:00:00 2001
bacbc8
From: Pablo Neira Ayuso <pablo@netfilter.org>
bacbc8
Date: Wed, 8 Aug 2018 21:52:50 +0200
bacbc8
Subject: [PATCH] tests: shell: validate too deep jumpstack from basechain
bacbc8
bacbc8
If there is no basechain, the validation is never exercised.
bacbc8
bacbc8
Too deep nested chains are fine as long as they are not connected to a
bacbc8
basechain.
bacbc8
bacbc8
Update test to add a basechain so we exercise validation.
bacbc8
bacbc8
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
bacbc8
(cherry picked from commit 760a8bab07ade570e589bc8da36935776d225d95)
bacbc8
Signed-off-by: Phil Sutter <psutter@redhat.com>
bacbc8
---
bacbc8
 tests/shell/testcases/chains/0002jumps_1 | 4 +++-
bacbc8
 1 file changed, 3 insertions(+), 1 deletion(-)
bacbc8
bacbc8
diff --git a/tests/shell/testcases/chains/0002jumps_1 b/tests/shell/testcases/chains/0002jumps_1
bacbc8
index 0cc89288670ed..4d163b05fe1b9 100755
bacbc8
--- a/tests/shell/testcases/chains/0002jumps_1
bacbc8
+++ b/tests/shell/testcases/chains/0002jumps_1
bacbc8
@@ -6,7 +6,9 @@ MAX_JUMPS=16
bacbc8
 
bacbc8
 $NFT add table t
bacbc8
 
bacbc8
-for i in $(seq 1 $MAX_JUMPS)
bacbc8
+$NFT add chain t c1 { type filter hook input priority 0\; }
bacbc8
+
bacbc8
+for i in $(seq 2 $MAX_JUMPS)
bacbc8
 do
bacbc8
 	$NFT add chain t c${i}
bacbc8
 done
bacbc8
-- 
bacbc8
2.21.0
bacbc8