diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2023-02-08 04:21:10 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-02-09 11:05:38 +0100 |
commit | 3a082086aa200852545cf15159213582c0c80eba (patch) | |
tree | 7785aa638533ff3fd567dc55d48965128f9cbf29 /tools | |
parent | net: mscc: ocelot: fix all IPv6 getting trapped to CPU when PTP timestamping ... (diff) | |
download | linux-3a082086aa200852545cf15159213582c0c80eba.tar.xz linux-3a082086aa200852545cf15159213582c0c80eba.zip |
selftests: forwarding: lib: quote the sysctl values
When set/restore sysctl value, we should quote the value as some keys
may have multi values, e.g. net.ipv4.ping_group_range
Fixes: f5ae57784ba8 ("selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/20230208032110.879205-1-liuhangbin@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/net/forwarding/lib.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 1c4f866de7d7..3d8e4ebda1b6 100755 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -914,14 +914,14 @@ sysctl_set() local value=$1; shift SYSCTL_ORIG[$key]=$(sysctl -n $key) - sysctl -qw $key=$value + sysctl -qw $key="$value" } sysctl_restore() { local key=$1; shift - sysctl -qw $key=${SYSCTL_ORIG["$key"]} + sysctl -qw $key="${SYSCTL_ORIG[$key]}" } forwarding_enable() |