Patch "selftests: Fix raw socket bind tests with VRF" has been added to the 5.10-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: Fix raw socket bind tests with VRF

to the 5.10-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-fix-raw-socket-bind-tests-with-vrf.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 3780b2dbf5c42bbbea305d8e4b7ec64a38f1346f
Author: David Ahern <dsahern@xxxxxxxxxx>
Date:   Sat Dec 11 10:21:08 2021 -0700

    selftests: Fix raw socket bind tests with VRF
    
    [ Upstream commit 0f108ae4452025fef529671998f6c7f1c4526790 ]
    
    Commit referenced below added negative socket bind tests for VRF. The
    socket binds should fail since the address to bind to is in a VRF yet
    the socket is not bound to the VRF or a device within it. Update the
    expected return code to check for 1 (bind failure) so the test passes
    when the bind fails as expected. Add a 'show_hint' comment to explain
    why the bind is expected to fail.
    
    Fixes: 75b2b2b3db4c ("selftests: Add ipv4 address bind tests to fcnal-test")
    Reported-by: Li Zhijian <lizhijian@xxxxxxxxxxx>
    Signed-off-by: David Ahern <dsahern@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
index 9f771f7e57450..dd67004a1d83a 100755
--- a/tools/testing/selftests/net/fcnal-test.sh
+++ b/tools/testing/selftests/net/fcnal-test.sh
@@ -1747,8 +1747,9 @@ ipv4_addr_bind_vrf()
 	for a in ${NSA_IP} ${VRF_IP}
 	do
 		log_start
+		show_hint "Socket not bound to VRF, but address is in VRF"
 		run_cmd nettest -s -R -P icmp -l ${a} -b
-		log_test_addr ${a} $? 0 "Raw socket bind to local address"
+		log_test_addr ${a} $? 1 "Raw socket bind to local address"
 
 		log_start
 		run_cmd nettest -s -R -P icmp -l ${a} -d ${NSA_DEV} -b



[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