nftables/SOURCES/0049-tests-shell-validate-too-deep-jumpstack-from-basecha.patch
2021-09-09 22:49:01 +00:00

38 lines
1.1 KiB
Diff

From 62e3a8f9d4246bc491d0b4aa11b250ed8ad06ecc Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Wed, 8 Aug 2018 21:52:50 +0200
Subject: [PATCH] tests: shell: validate too deep jumpstack from basechain
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>
(cherry picked from commit 760a8bab07ade570e589bc8da36935776d225d95)
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
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 0cc89288670ed..4d163b05fe1b9 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.21.0