Skip to content

Commit

Permalink
mptcp: avoid bogus reset on fallback close
Browse files Browse the repository at this point in the history
commit ff18f9e upstream.

Since the blamed commit, the MPTCP protocol unconditionally sends
TCP resets on all the subflows on disconnect().

That fits full-blown MPTCP sockets - to implement the fastclose
mechanism - but causes unexpected corruption of the data stream,
caught as sporadic self-tests failures.

Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios")
Cc: [email protected]
Tested-by: Matthieu Baerts <[email protected]>
Closes: multipath-tcp/mptcp_net-next#419
Signed-off-by: Paolo Abeni <[email protected]>
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
Link: https://lore.kernel.org/r/20230803-upstream-net-20230803-misc-fixes-6-5-v1-3-6671b1ab11cc@tessares.net
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Paolo Abeni authored and gregkh committed Aug 16, 2023
1 parent 4f733a0 commit 3c78824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2335,7 +2335,7 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,

lock_sock_nested(ssk, SINGLE_DEPTH_NESTING);

if (flags & MPTCP_CF_FASTCLOSE) {
if ((flags & MPTCP_CF_FASTCLOSE) && !__mptcp_check_fallback(msk)) {
/* be sure to force the tcp_disconnect() path,
* to generate the egress reset
*/
Expand Down

0 comments on commit 3c78824

Please sign in to comment.