]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: set msk local address earlier
authorPaolo Abeni <pabeni@redhat.com>
Fri, 21 Oct 2022 22:58:54 +0000 (15:58 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Oct 2022 04:13:55 +0000 (21:13 -0700)
commitbe0bad3832207c47b792080f3e3bbbf13498e9a1
tree450eaea62bb1923c1b52664e71b4558b079285bc
parent00571a07c776d24a64c1a910287f2a6f0e15738d
mptcp: set msk local address earlier

The mptcp_pm_nl_get_local_id() code assumes that the msk local address
is available at that point. For passive sockets, we initialize such
address at accept() time.

Depending on the running configuration and the user-space timing, a
passive MPJ subflow can join the msk socket before accept() completes.

In such case, the PM assigns a wrong local id to the MPJ subflow
and later PM netlink operations will end-up touching the wrong/unexpected
subflow.

All the above causes sporadic self-tests failures, especially when
the host is heavy loaded.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/308
Fixes: 99f1c40f5b5e ("mptcp: add netlink-based PM")
Fixes: be1dae032c5f ("mptcp: introduce implicit endpoints")
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c