Skip to content

Commit 800a666

Browse files
menglongdongdavem330
authored andcommitted
net: tcp: allow zero-window ACK update the window
Fow now, an ACK can update the window in following case, according to the tcp_may_update_window(): 1. the ACK acknowledged new data 2. the ACK has new data 3. the ACK expand the window and the seq of it is valid Now, we allow the ACK update the window if the window is 0, and the seq/ack of it is valid. This is for the case that the receiver replies an zero-window ACK when it is under memory stress and can't queue the new data. Signed-off-by: Menglong Dong <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e214282 commit 800a666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/tcp_input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3525,7 +3525,7 @@ static inline bool tcp_may_update_window(const struct tcp_sock *tp,
35253525
{
35263526
return after(ack, tp->snd_una) ||
35273527
after(ack_seq, tp->snd_wl1) ||
3528-
(ack_seq == tp->snd_wl1 && nwin > tp->snd_wnd);
3528+
(ack_seq == tp->snd_wl1 && (nwin > tp->snd_wnd || !nwin));
35293529
}
35303530

35313531
/* If we update tp->snd_una, also update tp->bytes_acked */

0 commit comments

Comments
 (0)