Commit a824084b authored by Paolo Abeni's avatar Paolo Abeni Committed by Jakub Kicinski
Browse files

mptcp: restore window probe



Since commit 72377ab2 ("mptcp: more conservative check for zero
probes") the MPTCP-level zero window probe check is always disabled, as
the TCP-level write queue always contains at least the newly allocated
skb.

Refine the relevant check tacking in account that the above condition
and that such skb can have zero length.

Fixes: 72377ab2 ("mptcp: more conservative check for zero probes")
Cc: stable@vger.kernel.org
Reported-by: default avatarGeliang Tang <geliang@kernel.org>
Closes: https://lore.kernel.org/d0a814c364e744ca6b836ccd5b6e9146882e8d42.camel@kernel.org


Reviewed-by: default avatarMat Martineau <martineau@kernel.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Tested-by: default avatarGeliang Tang <geliang@kernel.org>
Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20251028-net-mptcp-send-timeout-v1-3-38ffff5a9ec8@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8e04ce45
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1299,7 +1299,12 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
	if (copy == 0) {
		u64 snd_una = READ_ONCE(msk->snd_una);

		if (snd_una != msk->snd_nxt || tcp_write_queue_tail(ssk)) {
		/* No need for zero probe if there are any data pending
		 * either at the msk or ssk level; skb is the current write
		 * queue tail and can be empty at this point.
		 */
		if (snd_una != msk->snd_nxt || skb->len ||
		    skb != tcp_send_head(ssk)) {
			tcp_remove_empty_skb(ssk);
			return 0;
		}