I have a HTTP webservice where sometimes the connection setup fails in a strange way:
- client sends a SYN packet
- server sends a SYN,ACK reply
- client responds with RST
In which situations could a client system decide to reply with RST packet? I could imagine this happens when the SYN,ACK contains eg. incorrect sequence numbers (but this doesn't seem to apply in my case - the sequence numbers look fine). So I'm interested in an exhaustive :-) list of cases where a client would send a RST packet after receiving the SYN,ACK packet.
In particular, is it possible for the client application code (using normal BSD-style socket API under Linux) to cause this RST packet, eg. by calling
close() while 3-way handshake is still in progress?