Ask Your Question
0

Server sends FIN immediately after TCP handshake

asked 2024-08-30 19:14:14 +0000

Wireshark77 gravatar image

updated 2024-08-30 19:25:14 +0000

grahamb gravatar image

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
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2024-08-31 06:07:41 +0000

Jaap gravatar image

updated 2024-08-31 06:17:16 +0000

Your source port number cannot be zero.

Also your testing against a Facebook server which goes straight to QUIC, so nothing happens on port 80 anyway,

A better alternative is to use HTTP access to www.example.com, the IANA run site for illustrative purposes, or neverssl.com, which does the same.

edit flag offensive delete link more

Comments

Thank you so much. I've corrected the port and started to use example.com. Both have improved things massively.

Wireshark77 gravatar imageWireshark77 ( 2024-09-03 22:29:07 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-08-30 19:14:14 +0000

Seen: 97 times

Last updated: Aug 31