The TCPv4 specification (RFC 793) classifies a received segment as unacceptable if it has zero length, a sequence number equal to RCV.NXT
+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
. No 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.NXT
+RCV.WND
), since it was set to the latestSND.NXT
of 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.WND
is greater than0
, then a zero length segment would be accepted. Your condition 1 says that theRCV.WND
would be0
. 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.WND
is 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.RCV.WND
is0
. "...just exhausting the receive window of B." If the receive window is exhausted, then you cannot accept any more segments.RCV.NXT
+RCV.WND
, any further empty segment will have sequence number equal toRCV.NXT
+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.