lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #44092] tcp_pcb hangs in FIN_WAIT_1 after lwip_close c


From: Navaneeth Y V
Subject: [lwip-devel] [bug #44092] tcp_pcb hangs in FIN_WAIT_1 after lwip_close call
Date: Wed, 30 Aug 2017 01:32:03 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Follow-up Comment #4, bug #44092 (project lwip):

Sorry to Revive this old bug, I could hit a similar issue today. Essentially
the application of lwip initiates a close connection because of which TCP gets
into FIN_WAIT_1. Now because of a policy if we are dropping the packets from
the other peer ( That is no accept ACK / FIN ) We will be stuck in this state.


>From the code I can see that if we are in FIN_WAIT_2 we run a timer to clear
it up.

    if (pcb->state == FIN_WAIT_2) {
      /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time
out. */
      if (pcb->flags & TF_RXCLOSED) {
        /* PCB was fully closed (either through close() or SHUT_RDWR):
           normal FIN-WAIT timeout handling. */
        if ((u32_t)(tcp_ticks - pcb->tmr) >
            TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) {
          ++pcb_remove;
          LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in
FIN-WAIT-2\n"));
        }
      }
    }


But what about the cases in which we are in FIN_WAIT_1 ? Please let me know if
I have missed out something.

Thank you!


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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