I use raw socket to build a tcp client program and run it on machine A and I run a regular tcp server program on machine B
the raw socket-based client program first send a SYN packet and then it receives a SYN/ACK packet from the remote tcp server then the kernel of machine A sends a RST to the remote tcp server
the sequence number and ack-sequence number is fine
what are potential reasons?
and how to deal with it? thanks!
BTW: I used tcpdump to capture packets on the remote machine B and it shows "TCP port numbers reused" for the SYN packet from client, actually before the client send the SYN, I used
netstat -tnp
to check on-going tcp sessions, and it shows nothing