lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #56161] TCP state stays FIN_WAIT_1/CLOSING


From: yuanxin
Subject: [lwip-devel] [bug #56161] TCP state stays FIN_WAIT_1/CLOSING
Date: Thu, 18 Apr 2019 08:01:18 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36

URL:
  <https://savannah.nongnu.org/bugs/?56161>

                 Summary: TCP state stays FIN_WAIT_1/CLOSING
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: yuanx
            Submitted on: Thu 18 Apr 2019 12:01:15 PM UTC
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.0.3

    _______________________________________________________

Details:

A TCP connection always stays in  FIN_WAIT_1/CLOSING while network
faults happening like net cable plugging out, which makes tcp pcb cannot be
released. The following is my modification in function tcp_slowtmr:

The original code:

  if (pcb->state == LAST_ACK) {
      if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
        ++pcb_remove;
        LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in
LAST-ACK\n"));
      }
    }

My code:

if (pcb->state == LAST_ACK || pcb->state == FIN_WAIT_1 || pcb->state ==
CLOSING) {
      if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
        ++pcb_remove;
        LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in
LAST-ACK\n"));
      }
    }





    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?56161>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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