Commit 79bf0d4a authored by David Ahern's avatar David Ahern Committed by Jakub Kicinski

selftest: Fix set of ping_group_range in fcnal-test

ping_group_range sysctl has a compound value which does not go
through the various function layers in tact. Create a helper
function to bypass the layers and correctly set the value.
Signed-off-by: default avatarDavid Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240124214117.24687-3-dsahern@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ad9b701a
......@@ -190,6 +190,15 @@ kill_procs()
sleep 1
}
set_ping_group()
{
if [ "$VERBOSE" = "1" ]; then
echo "COMMAND: ${NSA_CMD} sysctl -q -w net.ipv4.ping_group_range='0 2147483647'"
fi
${NSA_CMD} sysctl -q -w net.ipv4.ping_group_range='0 2147483647'
}
do_run_cmd()
{
local cmd="$*"
......@@ -838,14 +847,14 @@ ipv4_ping()
set_sysctl net.ipv4.raw_l3mdev_accept=1 2>/dev/null
ipv4_ping_novrf
setup
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
set_ping_group
ipv4_ping_novrf
log_subsection "With VRF"
setup "yes"
ipv4_ping_vrf
setup "yes"
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
set_ping_group
ipv4_ping_vrf
}
......@@ -2056,12 +2065,12 @@ ipv4_addr_bind()
log_subsection "No VRF"
setup
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
set_ping_group
ipv4_addr_bind_novrf
log_subsection "With VRF"
setup "yes"
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
set_ping_group
ipv4_addr_bind_vrf
}
......@@ -2524,14 +2533,14 @@ ipv6_ping()
setup
ipv6_ping_novrf
setup
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
set_ping_group
ipv6_ping_novrf
log_subsection "With VRF"
setup "yes"
ipv6_ping_vrf
setup "yes"
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
set_ping_group
ipv6_ping_vrf
}
......
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