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 09:29:47 +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)

Follow-up Comment #1, bug #29067 (project lwip):


oups! Forget the tcp_close: closing in State: CLOSED.
This is my application closing the socket which could not be bound.
(please someone change the bug title...)

The problem is:
tcp_close: closing in State: TIME_WAIT

in tcp_input():
/* If a FIN segment was received, we call the callback
           function with a NULL buffer to indicate EOF. */
        if (recv_flags & TF_GOT_FIN) {
          /* correct rcv_wnd as the application won't call tcp_recved()
             for the FIN's seqno */
          if (pcb->rcv_wnd != TCP_WND) {
            pcb->rcv_wnd++;
          }
          TCP_EVENT_RECV(pcb, NULL, ERR_OK, err);
          if (err == ERR_ABRT) {
            goto aborted;
          }
        }

At this time the callback is tcp_recv_null() which finally calls
tcp_close_shutdown():

  default:
    /* Has already been closed, do nothing. */
    err = ERR_OK;
    pcb = NULL;
    break;
  }

Shouldn't we kill the PCB at this time when receiving a FIN ?





    _______________________________________________________

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]