summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-06-13 15:38:31 +0000
committerjhb <jhb@FreeBSD.org>2011-06-13 15:38:31 +0000
commit14a87d82fdaf6a248dd591005bd871a79d6a609c (patch)
treec31f3a736cc90c747bd9ce02dec80cfdc29b6a0d /sys/netinet/tcp_output.c
parenta39ac4a236abba351065e4e32b47932887383772 (diff)
downloadFreeBSD-src-14a87d82fdaf6a248dd591005bd871a79d6a609c.zip
FreeBSD-src-14a87d82fdaf6a248dd591005bd871a79d6a609c.tar.gz
Advance the advertised window (rcv_adv) to the currently received data
(rcv_nxt) if we advertising a zero window. This can be true when ACK'ing a window probe whose one byte payload was accepted rather than dropped because the socket's receive buffer was not completely full, but the remaining space was smaller than the window scale. This ensures that window probe ACKs satisfy the assumption made in r221346 and closes a window where rcv_nxt could be greater than rcv_adv. Tested by: trasz, pho, trociny Reviewed by: silby MFC after: 1 week
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 4b5fa10..32cb81e 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1331,7 +1331,7 @@ out:
* then remember the size of the advertised window.
* Any pending ACK has now been sent.
*/
- if (recwin > 0 && SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv))
+ if (recwin >= 0 && SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv))
tp->rcv_adv = tp->rcv_nxt + recwin;
tp->last_ack_sent = tp->rcv_nxt;
tp->t_flags &= ~(TF_ACKNOW | TF_DELACK);
OpenPOWER on IntegriCloud