Commit fcf04b1
mptcp: sync the msk->sndbuf at accept() time
On passive MPTCP connections, the msk sndbuf is not updated correctly.
The root cause is an order issue in the accept path:
- tcp_check_req() -> subflow_syn_recv_sock() -> mptcp_sk_clone_init()
calls __mptcp_propagate_sndbuf() to copy the ssk sndbuf into msk
- Later, tcp_child_process() -> tcp_init_transfer() ->
tcp_sndbuf_expand() grows the ssk sndbuf.
So __mptcp_propagate_sndbuf() runs before the ssk sndbuf has been
expanded and the msk ends up with a much smaller sndbuf than the
subflow:
MPTCP: msk->sndbuf:20480, msk->first->sndbuf:2626560
Fix this by moving the __mptcp_propagate_sndbuf() call from
mptcp_sk_clone_init() -- the ssk sndbuf is not yet finalized there -- to
__mptcp_propagate_sndbuf() at accept() time, when the ssk sndbuf has
been fully expanded by tcp_sndbuf_expand().
Fixes: 8005184 ("mptcp: refactor sndbuf auto-tuning")
Cc: stable@vger.kernel.org
Closes: multipath-tcp/mptcp_net-next#602
Signed-off-by: Gang Yan <yangang@kylinos.cn>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260420-net-mptcp-sync-sndbuf-accept-v1-1-e3523e3aeb44@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent 1cb36e2 commit fcf04b1
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3594 | 3594 | | |
3595 | 3595 | | |
3596 | 3596 | | |
3597 | | - | |
3598 | 3597 | | |
3599 | 3598 | | |
3600 | 3599 | | |
| |||
4252 | 4251 | | |
4253 | 4252 | | |
4254 | 4253 | | |
| 4254 | + | |
4255 | 4255 | | |
4256 | 4256 | | |
4257 | 4257 | | |
| |||
0 commit comments