TCP FIN with Data causing RST
Hi,
I am working on a problem where we get tcp resets from a a cloud service provider every time the tcp FIN is sent with data. I have done quite a bit of searching and haven't come across anything saying a segment can't be combined with a FIN but at the same time haven't come across any examples of a tcp close where the FIN packet has data.
Here is the tcp close sequence with my comments:
- Server: sends FIN with 165 bytes of data // expect client to ack of 165 +1 (data + 1 for the FIN), ACK & PSH flags present
- Client: sends ACK ack’ng 166 // client has ack'd data and FIN, nothing outstanding to ack, no data in this packet
- Client: sends 149 bytes // expect server to ack this 149 bytes, ACK flag present
- Client: sends FIN // no data in this packet, now expecting ack of the above 149 bytes and + 1 for the FIN flag, ACK flag present
- Server: send RST // ack of 149 bytes, client FIN not ack'd, ACK flag present
The the data flow is from client to server. The problem is when the client app is notified a RST was received from the server it considers the data wasn't received and needs to resend it. So that RST is causing us quite a bit of grief.
It seems to me the problem is on the server side, it shouldn't be sending a RST.
Thanks,
-Wes
Wireshark Wiki: tcp-ecn-sample.pcap
There are a few in Ultimate pcap running over IPv6.
Do you control the client? Why not combine #3 and #4 or hold #4 until #3 has been ACK'ed?