The TCPv4 specification (RFC 793) classifies a received segment as unacceptable if it has zero length, a sequence number equal to
RCV.WND while the receive window is not zero (second row in the table).
This essentially means that the segment will be discarded, other than possibly sending an
ACK processing or send window update will be done.
What is the justification of this?
Consider this scenario:
- Host A sends all possible data segments to host B, just exhausting the receive window of B.
- Host A shortly also sends an empty segment, e.g. a window update or acknowledgement of received data. This segment has sequence number equal to the right edge of the receive window of host B (
RCV.WND), since it was set to the latest
SND.NXTof host A.
- The mentioned data packets are lost in the network or delayed, and host B receives the empty segment first.
- Host B will classify the empty segment as not acceptable, and drop it, ignoring any acknowledgement or window update.
This seems to be particularly problematic, because the receiver will typically ignore seemingly older window updates based on the combination of sequence number and acknowledgement number. But just those window updates that won't get filtered out (highest sequence number) would be dropped even earlier due to segments not being considered acceptable.
Is there some part that I am not understanding correctly? Is this scenario really possible?
RCV.WNDis greater than
0, then a zero length segment would be accepted. Your condition 1 says that the
0. The text under the table says, "If the RCV.WND is zero, no segments will be acceptable, but special allowance should be made to accept valid ACKs, URGs and RSTs."
RCV.WNDis nonzero - empty segments with sequence numbers up to but not including RCV.NXT+RCV.WND will be accepted. Why not accept a zero-length segment with sequence number RCV.NXT+RCV.WND? It might be a window update, or acknowledgement of received data. Instead the spec seems to prefer for the receive window to be raised, before accepting another ack or window update from the remote.
0. "...just exhausting the receive window of B." If the receive window is exhausted, then you cannot accept any more segments.
RCV.WND, any further empty segment will have sequence number equal to
RCV.WND, and hence may be deemed unacceptable by B. That is, until either B extends the receive window, or all the transmitted data are accepted by B leaving it with a zero window which would then make empty segments from A acceptable again, according to the first row in the table.