Question about the right-edge check for zero-length segments in tcp_in_window()
Subsystems (2)
Hi,
While reading tcp_in_window() in net/ipv4/tcp_minisocks.c, I noticed the final condition:
return seq == e_win && seq == end_seq;
My understanding is that this covers the zero-window, zero-length case in RFC 9293 Table 6, where SEQ equals RCV.NXT. However, it also seems to allow a zero-length segment at SEQ=RCV.NXT+RCV.WND when the window is non-zero, whereas Table 6 specifies a strict upper bound for that case.
On Ubuntu 6.8.0-138-generic, I also observed that a pure ACK at this right edge, correctly acknowledging the SYN, completes the handshake with a non-zero advertised window. The Ubuntu kernel and Linux mainline sources I recently inspected retain this condition.
Could you clarify whether the non-zero-window case is intentionally included in this check as well? I noticed the discussion of relaxed sequence validation in RFC 9293 Appendix A.2, but am unsure whether it is related to this particular case.
Thanks!