Hello! Thursday, April 3, 2003, 3:51:47 PM Matthias Fend wrote:
FM> hello FM> i started testing the tcpip example from FM> mspgcc CVS (mspgcc/msp430-libc/examples/tcpip/*) FM> i've seen that victor antonovich applied a patch to fix FM> FIN_TIMEOUT handling... FM> but i think that there are still some problems left... FM> if i connect the device to internet i can happen that the FM> tcp-layer "hang up" -> you never can connect again FM> it seems that the layers below tcp are still working -> ping is working fine FM> what i found out till now: FM> the http server sent the page and has called tcpclose() FM> now the MSP runs in the mainloop and is calling DoNetworkstuff() again and again FM> normally the SocketStatus get rid of the active bit so that the mainloop FM> can do a TcpPassiveOpen again FM> the problem is that the SocketStatus (after TcpClose) stays unchanged for ever I has analysed source code of the example and has discovered that if TCP state machine goes into FIN_WAIT_2 state and FIN is never come in, TCP layer hang up and only reset can restore full functionality. This can happened in real internet application if connection with remote side will be broken before last FIN was sent. I wrote small patch which implements timeout in FIN_WAIT_2 state and prevents TCP layer hanging. Matthias tested this patch and says that it can solve the problem. The patch is attached to this message. Victor.
tcpip.patch
Description: Binary data