Skip to content

Commit a824084

Browse files
Paolo Abenikuba-moo
authored andcommitted
mptcp: restore window probe
Since commit 72377ab ("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: 72377ab ("mptcp: more conservative check for zero probes") Cc: [email protected] Reported-by: Geliang Tang <[email protected]> Closes: https://lore.kernel.org/[email protected] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Tested-by: Geliang Tang <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 8e04ce4 commit a824084

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

net/mptcp/protocol.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,12 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
12991299
if (copy == 0) {
13001300
u64 snd_una = READ_ONCE(msk->snd_una);
13011301

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

0 commit comments

Comments
 (0)