Patch "selftests: forwarding: lib: quote the sysctl values" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: forwarding: lib: quote the sysctl values

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-forwarding-lib-quote-the-sysctl-values.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c50edecf9486809f261f2752906554ca14916b39
Author: Hangbin Liu <liuhangbin@xxxxxxxxx>
Date:   Wed Feb 8 11:21:10 2023 +0800

    selftests: forwarding: lib: quote the sysctl values
    
    [ Upstream commit 3a082086aa200852545cf15159213582c0c80eba ]
    
    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@xxxxxxxxx>
    Reviewed-by: Petr Machata <petrm@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230208032110.879205-1-liuhangbin@xxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index ee03552b41167..7ead9d2aa6b8a 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -519,14 +519,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()



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux