mptcp: fix joined subflows with unblocking sk
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Mon, 27 Jul 2020 10:24:33 +0000 (12:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2020 18:50:57 +0000 (11:50 -0700)
commit367fe04eb64760fab400bdc990cc6067071e1e39
tree89ef40806824bdb9358799a03ef715233afec81f
parent04300d66f0a06d572d9f2ad6768c38cabde22179
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>
net/mptcp/protocol.c