lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #29067] TCP PCB stays in stated CLOSED when close() in


From: Stephane Lesage
Subject: [lwip-devel] [bug #29067] TCP PCB stays in stated CLOSED when close() initiated by LwIP
Date: Thu, 04 Mar 2010 08:57:52 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

URL:
  <http://savannah.nongnu.org/bugs/?29067>

                 Summary: TCP PCB stays in stated CLOSED when close()
initiated by LwIP
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: slesage
            Submitted on: jeu 04 mar 2010 09:57:51 CET
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:


This was first posted on [lwip-users] close(), TIME_WAIT and bind().

I have checked with Wireshark that the connection is closed properly with the
peer (FIN, FIN+ACK, ACK)

I enabled TCP_DEBUG to see what happens:

1. When the peer closes the connection, there is no problem.

    tcp_bind: bind to port 12302
    TCP connection request 21413 -> 12302.
    TCP connection established 21413 -> 12302.
    tcp_close: closing in State: LISTEN
    tcp_slowtmr: processing active pcb
    tcp_slowtmr: polling application
    tcp_slowtmr: processing active pcb
    tcp_close: closing in State: CLOSE_WAIT
    TCP connection closed: LAST_ACK 21413 -> 12302.
    tcp_pcb_purge
    tcp_bind: bind to port 12302
  
2. Now (CVS head), whenever my device closes the connection, I cannot bind()
for exactly 2 minutes (I thought the last connection stayed in TIME_WAIT...)

    tcp_bind: bind to port 12302
    TCP connection request 21400 -> 12302.
    TCP connection established 21400 -> 12302.
    tcp_close: closing in State: LISTEN
    tcp_recved: recveived 1 bytes, wnd 8192 (0).
    tcp_fasttmr: delayed ACK
    tcp_slowtmr: processing active pcb
    tcp_recved: recveived 5 bytes, wnd 8192 (0).
    tcp_close: closing in State: ESTABLISHED
    TCP connection closed: FIN_WAIT_2 21400 -> 12302.
    tcp_pcb_purge
    tcp_close: closing in State: TIME_WAIT
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_slowtmr: no active pcbs
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_slowtmr: no active pcbs
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_slowtmr: no active pcbs
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_slowtmr: no active pcbs
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_slowtmr: no active pcbs
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_slowtmr: no active pcbs
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED
    tcp_close: closing in State: CLOSED

[...]





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?29067>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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