lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [TCP]: Freeing of server socket.


From: Shingala, Krishna
Subject: [lwip-users] [TCP]: Freeing of server socket.
Date: Tue, 2 Jun 2015 14:37:21 +0000

Hi all,

 

We have observation with the TCP socket on lwIP.

 

Some info on the lwIP configuration: its configured for bare metal and IPv6 is used for both TCP and UDP transports.

The application is running HTTP server over lwIP and browsers connect to the device as HTTP clients.

 

It is observed that once we send the FIN, if peer responds with ACK and RST, the socket port is freed.

However, if the peer responds with a FIN, then the socket is never freed.

Therefore we end up in a situation where both parties have sent FIN which is ACKed, but there is no way of freeing the socket.

The slow timer does not clean up the socket either.

Or even detecting this occurred to trigger an abort.

 

Attached are wireshark logs that may be useful in better understanding what’s happening with the TCP states.

 

Also attaching a change in the TCP state machine that does solve the problem, but I am unsure this is the fix.

May be there is a better way of handling this situation?

 

Insights, questions and  comments are welcome!

 

Regards,

Krishna

Attachment: wireshark_FIN-FIN.pcapng
Description: wireshark_FIN-FIN.pcapng

Attachment: wireshark_FIN-RST.pcapng
Description: wireshark_FIN-RST.pcapng

Attachment: tcp_in.patch
Description: tcp_in.patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]