]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
selftests: mptcp: join: add ss mptcp support check
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 23 Feb 2024 16:14:17 +0000 (17:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Mar 2024 14:48:42 +0000 (14:48 +0000)
commit 9480f388a2ef54fba911d9325372abd69a328601 upstream.

Commands 'ss -M' are used in script mptcp_join.sh to display only MPTCP
sockets. So it must be checked if ss tool supports MPTCP in this script.

Fixes: e274f7154008 ("selftests: mptcp: add subflow limits test-cases")
Cc: stable@vger.kernel.org
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-7-162e87e48497@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh

index a72104dae2b9c24f3e06c3b0c45f43ccaada13d6..478878f613a8443f8cc99f25b607289a130395b4 100755 (executable)
@@ -159,6 +159,11 @@ check_tools()
                exit $ksft_skip
        fi
 
+       if ! ss -h | grep -q MPTCP; then
+               echo "SKIP: ss tool does not support MPTCP"
+               exit $ksft_skip
+       fi
+
        # Use the legacy version if available to support old kernel versions
        if iptables-legacy -V &> /dev/null; then
                iptables="iptables-legacy"