Hey all,

we had some weird behavior with a TCP connection on LWIP 1.4.1 when the peer 
(non-LWIP) has a cable disconnect:


  *   LWIP has an established TCP connection #1 running fine
  *   Peer has a cable disconnect
  *   Our application on top of LWIP runs into a receive timeout and closes the 
socket (500ms)
  *   Peer reconnects cable
  *   Our application opens a new connection #2 which again is established and 
running fine
  *   The FINACK+PSHACK re-sends of connection #1 also reaches the peer which 
answers RSTACK
  *   This keeps on looping until we restart the whole machine with LWIP

Also, I have a sort of "netstat" implemented on top of the LWIP socket API 
which runs over all possible sockets we have and if it finds a valid conn 
pointer there, prints infos (local addr, remot addr, port, TCP state and such). 
And connection #1 does not show up anymore in this view!

In my mind, the TCP state machine should be in FIN_WAIT_1 while the peer cable 
is disconnected?
And it should just jump to either CLOSED or TIME_WAIT when receiving the RSTs 
upon cable reconnect?

I attached a clipped pcap with only connection #1 shown and the problem 
starting at packet #19. Image the final exchange going on forever to understand 
the problem ;o)

Any comments or debugging ideas appreciated.

Kind regards
Fabian

Attachment: LWIP_1_4_1_TCP_state.pcapng
Description: LWIP_1_4_1_TCP_state.pcapng

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to