Whenever a TCP server with TCP fast open enabled, calls recv, send, and close before the TCP-ACK segment has been received, the TCP connection is just dropped and the reception of the TCP-ACK segment triggers the sending of a TCP RST segment.
Whenever a TCP server with TCP fast open enabled, calls recv, send, send, and close before the TCP-ACK segment has been received, the first byte provided in the second send call is not transferred.
Whenever a TCP client with TCP fast open enabled calls sendto followed by close the TCP connection was just dropped.
The second problem shows up when using thttpd with fast open enabled and requesting a CGI script.
This patch fixes the above issues.