Server sends FIN immediately after TCP handshake
Hi, I am writing my own small TCP stack and making an intiial TCP handshake and it looks correct, but after the third packet the server sends a FIN.
I have enabled checksum checking on TCP and they are correct. I cannot see any additional hints why this may be happening.
Could somebody please help me understand what is happening?
I'm new member so unfortunately cannot attach an image. I have pasted the summaries showing seq numbers below.
192.168.1.84 163.70.151.35 TCP 74 0 → 80 [SYN] Seq=0 Win=65535 Len=0 MSS=46085 SACK_PERM=1 TSval=2601039236 TSecr=0 WS=16384
163.70.151.35 192.168.1.84 TCP 74 80 → 0 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1392 SACK_PERM=1 TSval=916456970 TSecr=2601039236 WS=256
192.168.1.84 163.70.151.35 TCP 54 0 → 80 [ACK] Seq=1 Ack=1 Win=1073725440 Len=0
The server sends FIN milliseconds later:
163.70.151.35 192.168.1.84 TCP 66 80 → 0 [FIN, ACK] Seq=1 Ack=1 Win=65536 Len=0 TSval=916456984 TSecr=2601039236