Server send TCP ACK with wrong number after receiving SYN

I have a client establish new TCP connection then sends request to a server per second. Both client and server are on the same linux box (via loopback interface).

The client periodically reports socket error. After digging the network packets, the error seems related to the TCP problem:


50123 > 7001 [SYN] Seq=0 Win=32792 Len=0 MSS=16396 SACK_PERM=1 TSval=1326528350 TSecr=0 WS=128
[TCP ACKed lost segment] 7001 > 50123 [ACK] Seq=1 Ack=1834710718 Win=256 Len=0 TSval=1326528350 TSecr=1325798923 SLE=0 SRE=1
50123 > 7001 [RST] Seq=1834710718 Win=0 Len=0

I the above TCP segments, the client first send an TCP SYN to the server. In normal case, server should returns SYN-ACK with ack number=1, but in above snip, server returns ACK with wrong ack number=1834710718. Because the ack number is wrong, client RST the connection.

Any idea about this case?

Answer

Attribution
Source : Link , Question Author : petertc , Answer Author : Community

Leave a Comment