when a tcp connection is made to a existing host but a non-listening port, the tcp connection will stay in state SYN_SENT and will never be closed unless the process gets killed. tcpdump shows a SYN packet answered by a RST. so the RST should close the socket. the second problem is that at least the socket should time out in some way which isnt the case either. i have written a small tcp client that you can download at http://skywalker.patronas.de/tcpclient.c it connects 50 times, so after running that app, you will see 50 sockets in SYN_ACK state. How-To-Repeat: download http://skywalker.patronas.de/tcpclient.c compile run against exisiting host and non-listening port while the process is alive, netstat -an | grep [port]
Responsible Changed From-To: freebsd-i386->freebsd-net This does not sound i386-specific.
Responsible Changed From-To: freebsd-net->andre Take over.
Need to evaluate if this is still the case.
Hi Hiren, if the response to the SYN is a pure RST (without an ACK bit set), it should be ignored. If it is a RST-ACK, it should be accepted if and only if it acks the SYN. This is tested in https://github.com/freebsd-net/tcp-testsuite/blob/master/state-event-engine/rcv-rst-syn-sent/README.md and https://github.com/freebsd-net/tcp-testsuite/blob/master/state-event-engine/rcv-rst-ack-syn-sent/README.md. I found no issues using the test scripts. Best regards Michael
Michael, Thanks a lot for checking.