Commit 786fc12
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: 54f1944 ("mptcp: factor out mptcp_connect()")
Reported-by: Ondrej Mosnacek <omosnace@redhat.com>
Closes: multipath-tcp/mptcp_net-next#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>1 parent 3021dbf commit 786fc12
2 files changed
Lines changed: 7 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1702 | 1702 | | |
1703 | 1703 | | |
1704 | 1704 | | |
1705 | | - | |
1706 | 1705 | | |
1707 | 1706 | | |
1708 | 1707 | | |
| |||
3617 | 3616 | | |
3618 | 3617 | | |
3619 | 3618 | | |
3620 | | - | |
| 3619 | + | |
3621 | 3620 | | |
3622 | | - | |
| 3621 | + | |
3623 | 3622 | | |
3624 | 3623 | | |
3625 | 3624 | | |
| |||
3632 | 3631 | | |
3633 | 3632 | | |
3634 | 3633 | | |
3635 | | - | |
3636 | | - | |
| 3634 | + | |
| 3635 | + | |
3637 | 3636 | | |
3638 | | - | |
3639 | | - | |
3640 | | - | |
| 3637 | + | |
3641 | 3638 | | |
3642 | 3639 | | |
3643 | 3640 | | |
| |||
3696 | 3693 | | |
3697 | 3694 | | |
3698 | 3695 | | |
3699 | | - | |
3700 | | - | |
3701 | | - | |
3702 | | - | |
3703 | | - | |
3704 | | - | |
3705 | | - | |
3706 | | - | |
3707 | | - | |
3708 | | - | |
3709 | | - | |
3710 | | - | |
3711 | 3696 | | |
3712 | 3697 | | |
3713 | 3698 | | |
| |||
3859 | 3844 | | |
3860 | 3845 | | |
3861 | 3846 | | |
3862 | | - | |
| 3847 | + | |
3863 | 3848 | | |
3864 | 3849 | | |
3865 | 3850 | | |
| |||
3954 | 3939 | | |
3955 | 3940 | | |
3956 | 3941 | | |
3957 | | - | |
| 3942 | + | |
3958 | 3943 | | |
3959 | 3944 | | |
3960 | 3945 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
| |||
0 commit comments