Commit 8e2b318a authored by Florian Westphal's avatar Florian Westphal Committed by Jakub Kicinski

selftests: netfilter: nft_zones_many.sh: set ct sysctl after ruleset load

nf_conntrack_udp_timeout sysctl only exist once conntrack module is loaded,
if this test runs standalone on a modular kernel sysctl setting fails,
this can result in test failure as udp conntrack entries expire too fast.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20240422102546.2494-1-fw@strlen.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f03c528e
...@@ -28,7 +28,6 @@ fi ...@@ -28,7 +28,6 @@ fi
test_zones() { test_zones() {
local max_zones=$1 local max_zones=$1
ip netns exec "$ns1" sysctl -q net.netfilter.nf_conntrack_udp_timeout=3600
ip netns exec "$ns1" nft -f /dev/stdin<<EOF ip netns exec "$ns1" nft -f /dev/stdin<<EOF
flush ruleset flush ruleset
table inet raw { table inet raw {
...@@ -46,6 +45,9 @@ if [ "$?" -ne 0 ];then ...@@ -46,6 +45,9 @@ if [ "$?" -ne 0 ];then
echo "SKIP: Cannot add nftables rules" echo "SKIP: Cannot add nftables rules"
exit $ksft_skip exit $ksft_skip
fi fi
ip netns exec "$ns1" sysctl -q net.netfilter.nf_conntrack_udp_timeout=3600
( (
echo "add element inet raw rndzone {" echo "add element inet raw rndzone {"
for i in $(seq 1 "$max_zones");do for i in $(seq 1 "$max_zones");do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment