🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #17470

[PATCH net 4/7] mptcp: push queued data on passive TFO subflows becoming established

#17470
From: "Matthieu Baerts (NGI0)"
Date: Mon, 16 Nov 2026 22:06
64 lines
11424 bytes
With TCP Fast Open, the data written by an MPTCP server before the 3rd
ACK is not sent when this ACK arrives, but only when another event
triggers a push, e.g. new data from the peer. With a request/response
protocol, the client waits for the reply, which can then stay stuck.

A SYN with a valid TFO cookie creates a child socket right away, which
can be accepted while its subflow is still in the SYN_RECV state. The
MPTCP socket is already in the ESTABLISHED state: send() puts the data
in its write queue, but this data cannot be pushed to the subflow before
it is established, see __mptcp_subflow_active(). When the third ACK,
with the MP_CAPABLE option, arrives, check_fully_established() marks
the subflow as fully established, but nothing pushes the pending data:
this ACK has no DSS option, so ack_update_msk() is not called.

The fix used here is to push the pending data when a passive TFO subflow
becomes fully established. Checking subflow->is_mptfo is not enough:
since commit e00b63056fb4 ("mptcp: fastopen: only mark MPTFO subflows
with SYN data"), it is not set when the SYN has no data, while a child
is also created in this case. syn_fastopen_child is then used instead.

This issue has been reported by a user of proxies over MPTCP: the
clients put their requests in the SYN, and the replies from the targets
close to the server were stuck. It has been reproduced with new
Packetdrill tests, where the server writes data before the third ACK,
after a SYN with and without data. Without this patch, and before the
earlier commit "mptcp: arm the rtx timer if a push leaves data behind",
this data was not sent:

  server-tfo-write-before-3rd-ack.pkt:24: error handling packet: Timed out waiting for packet

Since this earlier commit, this data is sent, but only when the MPTCP
retransmission timer fires, here after one second, as the tests increase
its interval:

  server-tfo-write-before-3rd-ack.pkt:24: error handling packet: timing error: expected outbound packet at 0.237174 sec but happened at 1.181857 sec; tolerance 0.100000 sec

Fixes: 36b122baf6a8 ("mptcp: add subflow_v(4,6)_send_synack()")
Cc: stable@vger.kernel.org
Suggested-by: Petar Sakic <petar.sakic@ink.fish>
Suggested-by: T S Rameshkumar <rameshkumar.t@phytecembedded.in>
Reported-by: Petar Sakic <petar.sakic@ink.fish>
Closes: https://lore.kernel.org/mptcp/CAFPPu1gU2Y-D+d4i3F0MoNkYK+e1U+=X3qf6QycjfKBw+8snPg@mail.gmail.com/
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 net/mptcp/options.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1c58468b985b..bcf3440d1901 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1047,6 +1047,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 
 	mptcp_data_lock(sk);
 	__mptcp_subflow_fully_established(msk, subflow, mp_opt);
+	if (tcp_sk(ssk)->syn_fastopen_child)
+		__mptcp_check_push(sk, ssk);
 	mptcp_data_unlock(sk);
 
 check_notify:

-- 
2.55.0
Technical Details
Message-ID: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-4-bf7656de653e@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364752-linux-kernel-netdev=dewy.ru
References: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-0-bf7656de653e@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364752-linux-kernel-netdev=dewy.ru
From: matttbe@kernel.org ("Matthieu Baerts (NGI0)")
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 4/7] mptcp: push queued data on passive TFO subflows
 becoming established
Date: Mon, 16 Nov 2026 23:06:11 +0100
Organization: Usenet Network
Message-ID: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-4-bf7656de653e@kernel.org>
References: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-0-bf7656de653e@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2178743"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:zh+ji9ZIVo+bAA1vbq+qFan4nn4= sha256:jEtklJE2qVviCnCaqKdn+VOr0PgdtqNcw8DgnuDN1uM=
	sha1:WFjaMf5UDnov0iSvIcsw4ve0+8Y= sha256:BKoFBi3CtfiyZ3qbNxpJqFnFtwsWT3QZcV5Y3leo7zw=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id F0F60114D85; Tue, 17 Nov 2026 01:09:34 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id a8M4uFHMb7XH;
	Tue, 17 Nov 2026 01:09:31 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-364752-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 280B9114D74; Tue, 17 Nov 2026 01:09:22 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 02CA927EF3; Mon, 16 Nov 2026 22:09:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794866939;
	b=fTraE5GY/NWb1tmd4223/lzQSaaqk9EqLHbptL7p8fNepuwYGAbVTd42OHOcXn4Gc/5V
	 n8fM+Qt1Z5yq2ECWTGHBO866BmbvFkkx5HkSn7eBSsJQ3I7GNFip0POTF7QXM+2LSdpUT
	 YCZ1/vCcbveayNL582cgcaX5wWv2z7pcQnCUpSngoXgcdVnkVqRZVCW9Zv1yQeqDKVlTh
	 eiJ0nce44V4wQ67ERLPA5KM90zieNRAbopn2FCs3m9jn+L4WQnEm1Ev5Xn/Or7B/81B/d
	 cTqV3wjRCCelMvqvLFAbWQ0LDfjdWaE2ctBQok6DLyp8H/eXDpHLmQx1lwdBLEfSlAw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794866939;
	h=X-Original-To:Received:Received:DKIM-Signature:From:Date:Subject:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc:
	 X-Mailer:X-Developer-Signature:X-Developer-Key;
	bh=XqaW+Qhx8VDnAfYz2JghfbB6/NHBkgGqjkXI2iJsQaw=;
	b=z5Y1xxdEz9bNyIXQjs/1+XSu2iHKeZBuvxuybL6HfJ3meeQdYLZiDwmDc6Bx1LaU1u3A
	 8kzU7p9HW6F/6glDNxrdL5z1hjJywmBGDwJxn85mjX9fRyPS7+/OQNuTI1BqRfou98ZcY
	 o9TKxicr0wUYa7B9a1Jh51ve55dYc6WSMwAU7zyzbaDObZqPMPdL7ShOoug7iUxm1hloL
	 zNRd43Zmes7Kc/pVRtxh5P8Z96WAig48+I6B8vcztef8HGHb8gSmJAe1FYEOWDgExdU8H
	 9lfeydq6wi8pJXbTCvA85lcsnPnO3QYXf5ZENyrY5ujoZ6lfUMX+He0aiws0NnAj6Uw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=V6RZv3rz;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id CC00D606A88D;
	Mon, 16 Nov 2026 22:08:59 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=V6RZv3rz
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794866939;
	b=DDxo954dcmlOnphyFq1XFcglCoCH+fx5yW0jipSZ1AOPz9jbRnrrFDL9UqaAAjyzGe7K
	 RroJXkvRzBaKo3JT4+IAfAPzQVqzi1ae2JqbeVXl+wN9ckRXr1GZWYX/VMm6Awm9gGHct
	 egFFtvUK0IwVNZg/rj+FUm7+ILCLQryZdi2YeCda5TFxLuL4PSIJ2Zo+sX/pivT1C4NGh
	 BwuQO6QgZMVx5djO4OUf918hkFEmt1fJ0XfCx3aketUYornXHHSi1KegoPmIxtpKHMpw9
	 SPBdNfXpwHqJwssFZT6YHtt3qv8ais6K658NTsd4vd0XYSWxYN6awJoGxJq1aFl20NQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794866939;
	h=Received:DKIM-Signature:From:Date:Subject:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc:
	 X-Mailer:X-Developer-Signature:X-Developer-Key;
	bh=XqaW+Qhx8VDnAfYz2JghfbB6/NHBkgGqjkXI2iJsQaw=;
	b=PjRZYiL5xd0wZ3aeDQCZSF+61YPF/Dn7C3uLdqUfDssWOGOmCaJryZm2mTipXFKDChbW
	 AAO635bkTwWmj3eIKgfwwf2fEnStvz3gKPvcVyo5TbRvoneNtV0/B5cS1nfAJXjrAXqKK
	 1frmoDr5onDq/6KnA14OIDRNtOo+1UWy84U0igC/wzLxwgs8y3yXeNJROuQDadDa4fFvT
	 lwntin/lAaN42OeHlOWfZ0Z2/NwliexkZsnM1ili9ewLi8NSw5ZAX1T2GCiMsgW8p0kN2
	 asHCNBWYFAdhVizZXg45FuNzfyHdI9jvEAxwAj2S0u0Qk68xA5c7grUrXOu2T6RHzow==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=V6RZv3rz;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED7D9606A898;
	Mon, 16 Nov 2026 22:08:58 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 036AB1F000C4;
	Mon, 16 Nov 2026 22:08:55 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794866938;
	bh=XqaW+Qhx8VDnAfYz2JghfbB6/NHBkgGqjkXI2iJsQaw=;
	h=From:Date:Subject:References:In-Reply-To:To:Cc;
	b=V6RZv3rzfI9+SBVg+revsPO6JStwynq3VsxgmT4Pw47vOj0SuUDiS74oS00zM/qSb
	 wfsGlXcJ91T8XSKQMri9HCZrkxZ99CBSpbI9HNm0M4+brQ3ciAh1v61yRThaWrUW88
	 kiTWkyQRLSfZVVAshK/4aseJ1/ZhqdB76UQii7VJhkKvC0quBI0+TOL/boEjnyVCiu
	 5OTxSNXmQxXe63PRRuPIRLnpTbplOdmFOQfycAr5yIgKHOmb7sugjZo2hISQtiOvkI
	 a+DIZ3Hhqwn1iabx0hZuxvatAqat/zV+tu2+tbzqo7DWELgmTw00HzNs31tBr5hjSb
	 87gqmgWmF+6aA==
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-0-bf7656de653e@kernel.org>
X-Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, 
 linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, 
 stable@vger.kernel.org, Petar Sakic <petar.sakic@ink.fish>, 
 T S Rameshkumar <rameshkumar.t@phytecembedded.in>
X-Mailer: b4 0.17-dev
X-Developer-Signature: v=1; a=openpgp-sha256; l=3059; i=matttbe@kernel.org;
 h=from:subject:message-id; bh=d/ZZTVBXnUn2aIb2rzqSvZ8PZ3bEm+rqCAf6ZVsqk2g=;
 b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGLJ+173oa17MvcekNbtcp++8RyWb3bf3Cwp/+VyZ8jXGw
 fLfzT+XOkpZGMS4GGTFFFmk2yLzZz6v4i3x8rOAmcPKBDKEgYtTACYiYMHwT83pfsP247cS1CYG
 /t133Fv88G2eBOfImSaed+v6M/u+fWRkWOxvXrElc0HnnhqJxRXNjSoc4Xu05TsZzfVqn39N4Xb
 jBgA=
X-Developer-Key: i=matttbe@kernel.org; a=openpgp;
 fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073