diff options
author | 2020-07-27 12:24:33 +0200 | |
---|---|---|
committer | 2020-07-27 11:50:57 -0700 | |
commit | 367fe04eb64760fab400bdc990cc6067071e1e39 (patch) | |
tree | 89ef40806824bdb9358799a03ef715233afec81f /net/mptcp | |
parent | Merge tag 'riscv-for-linus-5.8-rc7' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
download | linux-367fe04eb64760fab400bdc990cc6067071e1e39.tar.gz linux-367fe04eb64760fab400bdc990cc6067071e1e39.tar.bz2 linux-367fe04eb64760fab400bdc990cc6067071e1e39.zip |
mptcp: fix joined subflows with unblocking sk
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
-rw-r--r-- | net/mptcp/protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ do_connect: /* 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)); |