]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mptcp: restore window probe
authorPaolo Abeni <pabeni@redhat.com>
Tue, 28 Oct 2025 08:16:54 +0000 (09:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:33:55 +0000 (15:33 -0500)
commit a824084b98d8a1dbd6e85d0842a8eb5e73467f59 upstream.

Since commit 72377ab2d671 ("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: 72377ab2d671 ("mptcp: more conservative check for zero probes")
Cc: stable@vger.kernel.org
Reported-by: Geliang Tang <geliang@kernel.org>
Closes: https://lore.kernel.org/d0a814c364e744ca6b836ccd5b6e9146882e8d42.camel@kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Tested-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20251028-net-mptcp-send-timeout-v1-3-38ffff5a9ec8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/protocol.c

index 3b2238628ac1cdcf7f0fa614cb5dc8ff365e0d48..5ded0841b1598a9e9211f587560044bc54a926ef 100644 (file)
@@ -1340,7 +1340,12 @@ alloc_skb:
        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;
                }