0
votes

I have a server running on linux(kernel 3.0.35) and a client running on Windows 7. Every time the client connects to the server a TCP retransmission occurs: Here is the traffic from wireshark: http://oi39.tinypic.com/ngsnyb.jpg

What I think happens is this:

The client(192.168.1.100) connects to the server(192.168.1.103), the connection is successful. At some point the client decides to close the connection( FIN,ACK), the server doesn't ACK the FIN. Then the client starts a new connection, that connection is ACK, and is successful. In the meantime the Windows kernel continues to retransmit the FIN,ACK packet, and finally decides to do a reset.

At the moment the second connection is established I don't receive the data that the client is sending(the packet with 16 bytes length) at server side, I receive these bytes only after the RST packet.

On the server side I'm using the poll() function to check for POLLIN events, and I'm not notified of any data until the RST packet arrives.

So does anyone know why this situation is happening?

1
So... the upshot is that the server stack is not handling the close request from the client in a TCP-compliant fashion? - Martin James
The problem is that in my server application I don't receive the 16 bytes sent by the client until I receive the RST packet, which is a very long time. - user711495

1 Answers

0
votes

Your data bytes are not sent on that 52687 connection but rather the following 52690 connection. I'd guess that the server app is accepting only one connection at a time (the kernel will accept them in advance and just hold the data) and thus not seeing data from the second connection until the first connection is dead and it moves on to the next.

That doesn't explain why your FIN is not being ACK'd. It should. Perhaps there is something in the kernel that doesn't like open-then-close-with-no-data connections? Maybe some kind of attack mitigation? Firewall rules?