]> git.baikalelectronics.ru Git - kernel.git/commitdiff
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)
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: 579db16d2ae8 ("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

index 3980fbb6f31ea154e12ef41f896916892eb015b2..c0abe738e7d31230e884e2154c1f28d49785faf4 100644 (file)
@@ -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));