[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #49631] Zero window and refused data problem
From: |
Joel Cunningham |
Subject: |
[lwip-devel] [bug #49631] Zero window and refused data problem |
Date: |
Wed, 23 Nov 2016 20:27:47 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 |
Follow-up Comment #1, bug #49631 (project lwip):
>From Simon and I discussion in the attached email:
"Joel Cunningham wrote:
> [..] So LwIP is behaving correctly for when the window is < 1 MSS. For wnd
> 1 MSS
> (regardless of update threshold) we should be using the current window value
in the ACK
Right. We should fix that...
Simon"
After looking at tcp_update_rcv_ann_wnd() in tcp.c, the logic is implemented
correctly. If the new window is greater than the smaller of TCP_WND/2 or
pcb->mss, we update pcb->rcv_ann_wnd, which is used for the window value
reported in the TCP header.
So the original poster (Oleg) must not have been reading more than 1 MSS out
of the receive buffer before his issue happened (or maybe this was broken on
1.4.1). LwIP is correct to not update the advertised window until TCP_WND/2
or pcb->mss is available.
I read over the original issue reported and there may be a problem with
zero-window probes once refused_data is set. I looked over RFC 793 which
includes the zero window probe details:
"When the receiving TCP has a zero window and a segment arrives it must
still send an acknowledgment showing its next expected sequence number
and current window (zero)."
If I'm understanding Oleg correctly, if we are advertising a zero window
(whether or not we have some space < pcb->mss) we should be sending an ACK in
response to the probe. If we have space in the receive buffer (0 < wnd <
pcb->mss) the ACK value would cover the probe's 1 byte if accepted into the
buffer, otherwise we would not increment the ACK field. Either way, an ACK
should be sent. I've seen both these cases from a Windows host, where the
zero window probe was truly ACKed and other cases where the ACK value was not
advanced past the probe.
Now if the issue is about refused_data when we aren't advertising a zero
window, then I think the standards don't offer guidance because we're in a
situation where we can't handle the senders segmentation given our advertised
window.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?49631>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/