summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2024-02-23 17:14:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-06 14:48:42 +0000
commitae5530ccd5ef6977c45e8ad17e66e164159cd6ff (patch)
tree6a16550adc640bfc7d8ff8385ab30ce02b1c5c5b
parent536a661bfdf45cad9795e8d8fbf6172f687e5cf4 (diff)
downloadlinux-stable-ae5530ccd5ef6977c45e8ad17e66e164159cd6ff.tar.gz
linux-stable-ae5530ccd5ef6977c45e8ad17e66e164159cd6ff.tar.bz2
linux-stable-ae5530ccd5ef6977c45e8ad17e66e164159cd6ff.zip
mptcp: fix snd_wnd initialization for passive socket
commit adf1bb78dab55e36d4d557aa2fb446ebcfe9e5ce upstream. Such value should be inherited from the first subflow, but passive sockets always used 'rsk_rcv_wnd'. Fixes: 6f8a612a33e4 ("mptcp: keep track of advertised windows right edge") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-5-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/mptcp/protocol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 5b953e26a586..5f4019b1ddf1 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3220,7 +3220,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
msk->write_seq = subflow_req->idsn + 1;
msk->snd_nxt = msk->write_seq;
msk->snd_una = msk->write_seq;
- msk->wnd_end = msk->snd_nxt + req->rsk_rcv_wnd;
+ msk->wnd_end = msk->snd_nxt + tcp_sk(ssk)->snd_wnd;
msk->setsockopt_seq = mptcp_sk(sk)->setsockopt_seq;
mptcp_init_sched(msk, mptcp_sk(sk)->sched);