All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH net] mptcp: fix joined subflows with unblocking sk
@ 2020-07-27 10:24 ` Matthieu Baerts
  0 siblings, 0 replies; 6+ messages in thread
From: Matthieu Baerts @ 2020-07-27 10:24 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

Unblocking sockets used for outgoing connections were not containing
inet info about the initial connection due to a typo there: the value of
"err" variable is negative in the kernelspace.

This fixes the creation of additional subflows where the remote port has
to be reused if the other host didn't announce another one. This also
fixes inet_diag showing blank info about MPTCP sockets from unblocking
sockets doing a connect().

Fixes: 41be81a8d3d0 ("mptcp: fix unblocking connect()")
Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 3980fbb6f31e..c0abe738e7d3 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1833,7 +1833,7 @@ static int mptcp_stream_connect(struct socket *sock, struct sockaddr *uaddr,
 	/* on successful connect, the msk state will be moved to established by
 	 * subflow_finish_connect()
 	 */
-	if (!err || err == EINPROGRESS)
+	if (!err || err == -EINPROGRESS)
 		mptcp_copy_inaddrs(sock->sk, ssock->sk);
 	else
 		inet_sk_state_store(sock->sk, inet_sk_state_load(ssock->sk));
-- 
2.27.0

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

* [PATCH net] mptcp: fix joined subflows with unblocking sk
@ 2020-07-27 10:24 ` Matthieu Baerts
  0 siblings, 0 replies; 6+ messages in thread
From: Matthieu Baerts @ 2020-07-27 10:24 UTC (permalink / raw)
  To: netdev
  Cc: Matthieu Baerts, Mat Martineau, David S. Miller, Jakub Kicinski,
	Paolo Abeni, mptcp, linux-kernel

Unblocking sockets used for outgoing connections were not containing
inet info about the initial connection due to a typo there: the value of
"err" variable is negative in the kernelspace.

This fixes the creation of additional subflows where the remote port has
to be reused if the other host didn't announce another one. This also
fixes inet_diag showing blank info about MPTCP sockets from unblocking
sockets doing a connect().

Fixes: 41be81a8d3d0 ("mptcp: fix unblocking connect()")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 3980fbb6f31e..c0abe738e7d3 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1833,7 +1833,7 @@ static int mptcp_stream_connect(struct socket *sock, struct sockaddr *uaddr,
 	/* on successful connect, the msk state will be moved to established by
 	 * subflow_finish_connect()
 	 */
-	if (!err || err == EINPROGRESS)
+	if (!err || err == -EINPROGRESS)
 		mptcp_copy_inaddrs(sock->sk, ssock->sk);
 	else
 		inet_sk_state_store(sock->sk, inet_sk_state_load(ssock->sk));
-- 
2.27.0


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

* [MPTCP] Re: [PATCH net] mptcp: fix joined subflows with unblocking sk
  2020-07-27 10:24 ` Matthieu Baerts
@ 2020-07-27 10:38 ` Paolo Abeni
  -1 siblings, 0 replies; 6+ messages in thread
From: Paolo Abeni @ 2020-07-27 10:38 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

On Mon, 2020-07-27 at 12:24 +0200, Matthieu Baerts wrote:
> Unblocking sockets used for outgoing connections were not containing
> inet info about the initial connection due to a typo there: the value of
> "err" variable is negative in the kernelspace.
> 
> This fixes the creation of additional subflows where the remote port has
> to be reused if the other host didn't announce another one. This also
> fixes inet_diag showing blank info about MPTCP sockets from unblocking
> sockets doing a connect().
> 
> Fixes: 41be81a8d3d0 ("mptcp: fix unblocking connect()")
> Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>

Acked-by: Paolo Abeni <pabeni(a)redhat.com>

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

* Re: [PATCH net] mptcp: fix joined subflows with unblocking sk
@ 2020-07-27 10:38 ` Paolo Abeni
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Abeni @ 2020-07-27 10:38 UTC (permalink / raw)
  To: Matthieu Baerts, netdev
  Cc: Mat Martineau, David S. Miller, Jakub Kicinski, mptcp, linux-kernel

On Mon, 2020-07-27 at 12:24 +0200, Matthieu Baerts wrote:
> Unblocking sockets used for outgoing connections were not containing
> inet info about the initial connection due to a typo there: the value of
> "err" variable is negative in the kernelspace.
> 
> This fixes the creation of additional subflows where the remote port has
> to be reused if the other host didn't announce another one. This also
> fixes inet_diag showing blank info about MPTCP sockets from unblocking
> sockets doing a connect().
> 
> Fixes: 41be81a8d3d0 ("mptcp: fix unblocking connect()")
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>

Acked-by: Paolo Abeni <pabeni@redhat.com>


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

* [MPTCP] Re: [PATCH net] mptcp: fix joined subflows with unblocking sk
  2020-07-27 10:24 ` Matthieu Baerts
@ 2020-07-27 18:52 ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-07-27 18:52 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

From: Matthieu Baerts <matthieu.baerts(a)tessares.net>
Date: Mon, 27 Jul 2020 12:24:33 +0200

> Unblocking sockets used for outgoing connections were not containing
> inet info about the initial connection due to a typo there: the value of
> "err" variable is negative in the kernelspace.
> 
> This fixes the creation of additional subflows where the remote port has
> to be reused if the other host didn't announce another one. This also
> fixes inet_diag showing blank info about MPTCP sockets from unblocking
> sockets doing a connect().
> 
> Fixes: 41be81a8d3d0 ("mptcp: fix unblocking connect()")
> Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>

Applied, thanks!

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

* Re: [PATCH net] mptcp: fix joined subflows with unblocking sk
@ 2020-07-27 18:52 ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-07-27 18:52 UTC (permalink / raw)
  To: matthieu.baerts
  Cc: netdev, mathew.j.martineau, kuba, pabeni, mptcp, linux-kernel

From: Matthieu Baerts <matthieu.baerts@tessares.net>
Date: Mon, 27 Jul 2020 12:24:33 +0200

> Unblocking sockets used for outgoing connections were not containing
> inet info about the initial connection due to a typo there: the value of
> "err" variable is negative in the kernelspace.
> 
> This fixes the creation of additional subflows where the remote port has
> to be reused if the other host didn't announce another one. This also
> fixes inet_diag showing blank info about MPTCP sockets from unblocking
> sockets doing a connect().
> 
> Fixes: 41be81a8d3d0 ("mptcp: fix unblocking connect()")
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>

Applied, thanks!

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

end of thread, other threads:[~2020-07-27 18:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 18:52 [MPTCP] Re: [PATCH net] mptcp: fix joined subflows with unblocking sk David Miller
2020-07-27 18:52 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2020-07-27 10:38 [MPTCP] " Paolo Abeni
2020-07-27 10:38 ` Paolo Abeni
2020-07-27 10:24 [MPTCP] " Matthieu Baerts
2020-07-27 10:24 ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.