From nobody Wed May 15 19:37:43 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6C3C27124 for ; Thu, 27 Jul 2023 17:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690478164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ydU1BYqgNMzmBC7OrcxB0raPQ9PqP4tk2JS9UTx9uM=; b=Fzt0sAMBVNeRzqxUnVrOM2OfblR7+9gLujVw2XmzbYdjoQJeTPvqVLgCpwAy5LXdu9VELF ot4JGqfKW6OHQNesx9HTQfosD9Gbch0y5wvYeklbzJD0kBrYwrZQMx3Cw3t+SUQWxdO/sZ sj1MsixXZULi6ej5gQ5wsgH4/jnECBk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-168-JBqibr2UPYyBBrTfJOscUA-1; Thu, 27 Jul 2023 13:16:02 -0400 X-MC-Unique: JBqibr2UPYyBBrTfJOscUA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9D77B185A7A5 for ; Thu, 27 Jul 2023 17:16:02 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.45.225.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2CC8C1454151 for ; Thu, 27 Jul 2023 17:16:02 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH mptcp-net] mptcp: avoid bogus reset on fallback close Date: Thu, 27 Jul 2023 19:15:50 +0200 Message-ID: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; x-default="true" Since the blamed commit, the MPTCP protocol unconditionally sends TCP resets on all the subflows on disconnect(). That fits full-blown MPTCP sockets - to implement the fastclose mechanism - but causes unexpected corruption of the data stream, catched as sporadic self-tests failures. Fixes: d21f83485518 ("mptcp: use fastclose on more edge scenarios") Tested-by: Matthieu Baerts Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/419 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts --- net/mptcp/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 8b9ff7457d56..4031a43c03b0 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2346,7 +2346,7 @@ static void __mptcp_close_ssk(struct sock *sk, struct= sock *ssk, =20 lock_sock_nested(ssk, SINGLE_DEPTH_NESTING); =20 - if (flags & MPTCP_CF_FASTCLOSE) { + if ((flags & MPTCP_CF_FASTCLOSE) && !__mptcp_check_fallback(msk)) { /* be sure to force the tcp_disconnect() path, * to generate the egress reset */ --=20 2.41.0