]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.6/selftests-mptcp-join-fix-dev-in-check_endpoint.patch
Linux 6.1.85
[thirdparty/kernel/stable-queue.git] / queue-6.6 / selftests-mptcp-join-fix-dev-in-check_endpoint.patch
1 From 40061817d95bce6dd5634a61a65cd5922e6ccc92 Mon Sep 17 00:00:00 2001
2 From: Geliang Tang <tanggeliang@kylinos.cn>
3 Date: Fri, 29 Mar 2024 13:08:53 +0100
4 Subject: selftests: mptcp: join: fix dev in check_endpoint
5
6 From: Geliang Tang <tanggeliang@kylinos.cn>
7
8 commit 40061817d95bce6dd5634a61a65cd5922e6ccc92 upstream.
9
10 There's a bug in pm_nl_check_endpoint(), 'dev' didn't be parsed correctly.
11 If calling it in the 2nd test of endpoint_tests() too, it fails with an
12 error like this:
13
14 creation [FAIL] expected '10.0.2.2 id 2 subflow dev dev' \
15 found '10.0.2.2 id 2 subflow dev ns2eth2'
16
17 The reason is '$2' should be set to 'dev', not '$1'. This patch fixes it.
18
19 Fixes: 69c6ce7b6eca ("selftests: mptcp: add implicit endpoint test case")
20 Cc: stable@vger.kernel.org
21 Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
22 Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
23 Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
24 Link: https://lore.kernel.org/r/20240329-upstream-net-20240329-fallback-mib-v1-2-324a8981da48@kernel.org
25 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27 ---
28 tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +++-
29 1 file changed, 3 insertions(+), 1 deletion(-)
30
31 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
32 +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
33 @@ -796,7 +796,7 @@ pm_nl_check_endpoint()
34 [ -n "$_flags" ]; flags="flags $_flags"
35 shift
36 elif [ $1 = "dev" ]; then
37 - [ -n "$2" ]; dev="dev $1"
38 + [ -n "$2" ]; dev="dev $2"
39 shift
40 elif [ $1 = "id" ]; then
41 _id=$2
42 @@ -3507,6 +3507,8 @@ endpoint_tests()
43 local tests_pid=$!
44
45 wait_mpj $ns2
46 + pm_nl_check_endpoint "creation" \
47 + $ns2 10.0.2.2 id 2 flags subflow dev ns2eth2
48 chk_subflow_nr "before delete" 2
49 chk_mptcp_info subflows 1 subflows 1
50