Message ID | 20240607151357.421181-5-petrm@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 6f51aed38a4f4923a699d741553c612dec85fd14 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Allow configuration of multipath hash seed | expand |
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index eabbdf00d8ca..9086d2015296 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -1134,12 +1134,19 @@ bridge_ageing_time_get() } declare -A SYSCTL_ORIG +sysctl_save() +{ + local key=$1; shift + + SYSCTL_ORIG[$key]=$(sysctl -n $key) +} + sysctl_set() { local key=$1; shift local value=$1; shift - SYSCTL_ORIG[$key]=$(sysctl -n $key) + sysctl_save "$key" sysctl -qw $key="$value" }