From: Paolo Abeni <[email protected]>
If the MPTCP socket fallback to TCP before the MP handshake completion,
the IASN remain 0, and the rcv_wnd_sent field is not explicitly
initialized, just incremented over time with the data transfer.
At disconnect time such value is not cleared. If the next connection falls
back to TCP before the MP handshake completion, the data transfer will
keep incrementing the receive window end sequence starting from the last
value used in the previous connection: the announced window will be
unrelated from the actual receiver buffer size and likely too big.
Address the issue zeroing the field at disconnect time.
Fixes: b29fcfb54cd7 ("mptcp: full disconnect implementation")
Cc: [email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Link:
https://patch.msgid.link/20260515-net-mptcp-misc-fixes-7-1-rc4-v2-4-701e96419...@kernel.org
Signed-off-by: Paolo Abeni <[email protected]>
(cherry picked from commit 0981f90e1a05773a4c29c6e720f5ea1e3c8f1876)
Rebase note: this tree lacks commits 2834f8edd74d ("mptcp: cleanup
fallback dummy mapping generation") and d2000361e4dd ("mptcp: better
mptcp-level RTT estimator"), which add the lines around the mainline
hunk, so the reset goes after the other counters.
https://virtuozzo.atlassian.net/browse/VSTOR-155322
Feature: fix ms/net
Signed-off-by: Eva Kurchatova <[email protected]>
---
net/mptcp/protocol.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index e526648a583e..40d78fe6e111 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3238,6 +3238,7 @@ static int mptcp_disconnect(struct sock *sk, int flags)
msk->bytes_retrans = 0;
msk->rcvspace_init = 0;
msk->fastclosing = 0;
+ atomic64_set(&msk->rcv_wnd_sent, 0);
WRITE_ONCE(sk->sk_shutdown, 0);
sk_error_report(sk);
--
2.56.1
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel