stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 6.1.y] mptcp: continue marking the first subflow as UNCONNECTED
@ 2024-02-28 17:21 Matthieu Baerts (NGI0)
  2024-03-04  8:11 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Baerts (NGI0) @ 2024-02-28 17:21 UTC (permalink / raw)
  To: stable, gregkh, sashal; +Cc: MPTCP Upstream, Matthieu Baerts (NGI0)

After the 'Fixes' commit mentioned below, which is a partial backport,
the MPTCP worker was no longer marking the first subflow as "UNCONNECTED"
when the socket was transitioning to TCP_CLOSE state.

As a result, in v6.1, it was no longer possible to reconnect to the just
disconnected socket. Continue to do that like before, only for the first
subflow.

A few refactoring have been done around the 'msk->subflow' in later
versions, and it looks like this is not needed to do that there, but
still needed in v6.1. Without that, the 'disconnect' tests from the
mptcp_connect.sh selftest fail: they repeat the transfer 3 times by
reconnecting to the server each time.

Fixes: 7857e35ef10e ("mptcp: get rid of msk->subflow")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Notes:
 - This is specific to the 6.1 version having the partial backport.
---
 net/mptcp/protocol.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index cdabb00648bd2..125825db642cc 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2440,6 +2440,8 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,
 	need_push = (flags & MPTCP_CF_PUSH) && __mptcp_retransmit_pending_data(sk);
 	if (!dispose_it) {
 		__mptcp_subflow_disconnect(ssk, subflow, flags);
+		if (msk->subflow && ssk == msk->subflow->sk)
+			msk->subflow->state = SS_UNCONNECTED;
 		release_sock(ssk);
 
 		goto out;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 6.1.y] mptcp: continue marking the first subflow as UNCONNECTED
  2024-02-28 17:21 [PATCH 6.1.y] mptcp: continue marking the first subflow as UNCONNECTED Matthieu Baerts (NGI0)
@ 2024-03-04  8:11 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2024-03-04  8:11 UTC (permalink / raw)
  To: Matthieu Baerts (NGI0); +Cc: stable, sashal, MPTCP Upstream

On Wed, Feb 28, 2024 at 06:21:21PM +0100, Matthieu Baerts (NGI0) wrote:
> After the 'Fixes' commit mentioned below, which is a partial backport,
> the MPTCP worker was no longer marking the first subflow as "UNCONNECTED"
> when the socket was transitioning to TCP_CLOSE state.
> 
> As a result, in v6.1, it was no longer possible to reconnect to the just
> disconnected socket. Continue to do that like before, only for the first
> subflow.
> 
> A few refactoring have been done around the 'msk->subflow' in later
> versions, and it looks like this is not needed to do that there, but
> still needed in v6.1. Without that, the 'disconnect' tests from the
> mptcp_connect.sh selftest fail: they repeat the transfer 3 times by
> reconnecting to the server each time.
> 
> Fixes: 7857e35ef10e ("mptcp: get rid of msk->subflow")
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Notes:
>  - This is specific to the 6.1 version having the partial backport.

All 6.1 backports now queued up, thanks!

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-04  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 17:21 [PATCH 6.1.y] mptcp: continue marking the first subflow as UNCONNECTED Matthieu Baerts (NGI0)
2024-03-04  8:11 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).