]> git.dujemihanovic.xyz Git - linux.git/commitdiff
selftests: mptcp: run mptcp_inq from a clean netns
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Wed, 30 Nov 2022 14:06:23 +0000 (15:06 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 2 Dec 2022 04:06:05 +0000 (20:06 -0800)
A new "sandbox" net namespace is available where no other netfilter
rules have been added.

Use this new netns instead of re-using "ns1" and clean it.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh

index 80d36f7cfee8a9f09de93582c0634e087d869fdd..8a83100b212e937a2895c98a5292c7b1bf79929c 100755 (executable)
@@ -282,7 +282,7 @@ run_tests()
 
 do_tcpinq_test()
 {
-       ip netns exec "$ns1" ./mptcp_inq "$@"
+       ip netns exec "$ns_sbox" ./mptcp_inq "$@"
        lret=$?
        if [ $lret -ne 0 ];then
                ret=$lret
@@ -298,9 +298,6 @@ do_tcpinq_tests()
 {
        local lret=0
 
-       ip netns exec "$ns1" iptables -F
-       ip netns exec "$ns1" ip6tables -F
-
        for args in "-t tcp" "-r tcp"; do
                do_tcpinq_test $args
                lret=$?