2023-08-03 17:28:39

by Matthieu Baerts

[permalink] [raw]
Subject: [PATCH net 0/4] mptcp: more fixes for v6.5

Here is a new batch of fixes related to MPTCP for v6.5 and older.

Patches 1 and 2 fix issues with MPTCP Join selftest when manually
launched with '-i' parameter to use 'ip mptcp' tool instead of the
dedicated one (pm_nl_ctl). The issues have been there since v5.18.

Thank you Andrea for your first contributions to MPTCP code in the
upstream kernel!

Patch 3 avoids corrupting the data stream when trying to reset
connections that have fallen back to TCP. This can happen from v6.1.

Patch 4 fixes a race when doing a disconnect() and an accept() in
parallel on a listener socket. The issue only happens in rare cases if
the user is really unlucky since a fix that landed in v6.3 but
backported up to v6.1.

Signed-off-by: Matthieu Baerts <[email protected]>
---
Andrea Claudi (2):
selftests: mptcp: join: fix 'delete and re-add' test
selftests: mptcp: join: fix 'implicit EP' test

Paolo Abeni (2):
mptcp: avoid bogus reset on fallback close
mptcp: fix disconnect vs accept race

net/mptcp/protocol.c | 2 +-
net/mptcp/protocol.h | 1 -
net/mptcp/subflow.c | 60 ++++++++++++-------------
tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 ++-
4 files changed, 35 insertions(+), 34 deletions(-)
---
base-commit: 0f71c9caf26726efea674646f566984e735cc3b9
change-id: 20230803-upstream-net-20230803-misc-fixes-6-5-6046c6ca74b6

Best regards,
--
Matthieu Baerts <[email protected]>



2023-08-03 18:35:59

by Matthieu Baerts

[permalink] [raw]
Subject: [PATCH net 2/4] selftests: mptcp: join: fix 'implicit EP' test

From: Andrea Claudi <[email protected]>

mptcp_join 'implicit EP' test currently fails when using ip mptcp:

$ ./mptcp_join.sh -iI
<snip>
001 implicit EP creation[fail] expected '10.0.2.2 10.0.2.2 id 1 implicit' found '10.0.2.2 id 1 rawflags 10 '
Error: too many addresses or duplicate one: -22.
ID change is prevented[fail] expected '10.0.2.2 10.0.2.2 id 1 implicit' found '10.0.2.2 id 1 rawflags 10 '
modif is allowed[fail] expected '10.0.2.2 10.0.2.2 id 1 signal' found '10.0.2.2 id 1 signal '

This happens because of two reasons:
- iproute v6.3.0 does not support the implicit flag, fixed with
iproute2-next commit 3a2535a41854 ("mptcp: add support for implicit
flag")
- pm_nl_check_endpoint wrongly expects the ip address to be repeated two
times in iproute output, and does not account for a final whitespace
in it.

This fixes the issue trimming the whitespace in the output string and
removing the double address in the expected string.

Fixes: 69c6ce7b6eca ("selftests: mptcp: add implicit endpoint test case")
Cc: [email protected]
Signed-off-by: Andrea Claudi <[email protected]>
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 067fabc401f1..d01b73a8ed0f 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -796,10 +796,11 @@ pm_nl_check_endpoint()
fi

if [ $ip_mptcp -eq 1 ]; then
+ # get line and trim trailing whitespace
line=$(ip -n $ns mptcp endpoint show $id)
+ line="${line% }"
# the dump order is: address id flags port dev
- expected_line="$addr"
- [ -n "$addr" ] && expected_line="$expected_line $addr"
+ [ -n "$addr" ] && expected_line="$addr"
expected_line="$expected_line $id"
[ -n "$_flags" ] && expected_line="$expected_line ${_flags//","/" "}"
[ -n "$dev" ] && expected_line="$expected_line $dev"

--
2.40.1


2023-08-05 03:07:54

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net 0/4] mptcp: more fixes for v6.5

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

On Thu, 03 Aug 2023 18:27:26 +0200 you wrote:
> Here is a new batch of fixes related to MPTCP for v6.5 and older.
>
> Patches 1 and 2 fix issues with MPTCP Join selftest when manually
> launched with '-i' parameter to use 'ip mptcp' tool instead of the
> dedicated one (pm_nl_ctl). The issues have been there since v5.18.
>
> Thank you Andrea for your first contributions to MPTCP code in the
> upstream kernel!
>
> [...]

Here is the summary with links:
- [net,1/4] selftests: mptcp: join: fix 'delete and re-add' test
https://git.kernel.org/netdev/net/c/aaf2123a5cf4
- [net,2/4] selftests: mptcp: join: fix 'implicit EP' test
https://git.kernel.org/netdev/net/c/c8c101ae390a
- [net,3/4] mptcp: avoid bogus reset on fallback close
https://git.kernel.org/netdev/net/c/ff18f9ef30ee
- [net,4/4] mptcp: fix disconnect vs accept race
https://git.kernel.org/netdev/net/c/511b90e39250

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html