Describe the bug
I used FreeRTOS to create a server that I connected to a client application.
When I want to terminate the connection, I call close() on my client application. This sends the FIN+ACK frame to FreeRTOS.
According to the TCP RFC, FreeRTOS is supposed to first acknowledge the FIN+ACK by sending an ACK before sending its own FIN+ACK to close its side of the connection.
But FreeRTOS only sends a FIN+ACK in response to the client’s FIN+ACK. It doesn’t first acknowledge the peer’s FIN+ACK.
I am not sure if this is allowed by the TCP standard. I have added a screenshot from Tshark and a sample C TCP client. I have also written steps that can be used to reproduce this issue.
Target
- Development board: Linux port
Host
- Host OS: Linux
- Version: Ubuntu 20.04
To Reproduce
- Clone the FreeRTOS+TCP demo application and modify it to run as a TCP server.
- Use Wireshark or Tshark to monitor the packets to and from FreeRTOS.
- Connect to the FreeRTOS+TCP demo application using a client application.
- Let the client application call the close function after concluding its transactions.
- Monitor the tshark or Wireshark logs.
Screenshot