diff options
author | Paolo Abeni <pabeni@redhat.com> | 2023-05-31 21:37:03 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-01 19:04:04 +0200 |
commit | 786fc12457268cc9b555dde6c22ae7300d4b40e1 (patch) | |
tree | 00569cbd4f715ea9da2c483a60354e3c0e9bd1f8 /net/mptcp/protocol.h | |
parent | Merge branch 'rtnetlink-a-couple-of-fixes-in-linkmsg-validation' (diff) | |
download | linux-786fc12457268cc9b555dde6c22ae7300d4b40e1.tar.xz linux-786fc12457268cc9b555dde6c22ae7300d4b40e1.zip |
mptcp: fix connect timeout handling
Ondrej reported a functional issue WRT timeout handling on connect
with a nice reproducer.
The problem is that the current mptcp connect waits for both the
MPTCP socket level timeout, and the first subflow socket timeout.
The latter is not influenced/touched by the exposed setsockopt().
Overall the above makes the SO_SNDTIMEO a no-op on connect.
Since mptcp_connect is invoked via inet_stream_connect and the
latter properly handle the MPTCP level timeout, we can address the
issue making the nested subflow level connect always unblocking.
This also allow simplifying a bit the code, dropping an ugly hack
to handle the fastopen and custom proto_ops connect.
The issues predates the blamed commit below, but the current resolution
requires the infrastructure introduced there.
Fixes: 54f1944ed6d2 ("mptcp: factor out mptcp_connect()")
Reported-by: Ondrej Mosnacek <omosnace@redhat.com>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/399
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | net/mptcp/protocol.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 2d7b2c80a164..de4667dafe59 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -297,7 +297,6 @@ struct mptcp_sock { nodelay:1, fastopening:1, in_accept_queue:1; - int connect_flags; struct work_struct work; struct sk_buff *ooo_last_skb; struct rb_root out_of_order_queue; |