lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #44595] netconn_recv does not set last_err on CLOSE_WA


From: Ivan Delamer
Subject: [lwip-devel] [bug #44595] netconn_recv does not set last_err on CLOSE_WAIT
Date: Fri, 20 Mar 2015 20:50:09 +0000
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0

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

                 Summary: netconn_recv does not set last_err on CLOSE_WAIT
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: idelamer
            Submitted on: Fri 20 Mar 2015 02:50:07 PM MDT
                Category: sockets/netconn
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: git head

    _______________________________________________________

Details:

In a half closed netconn (we have received FIN), recvmbox is set to invalid.

If we call netconn_recv, it will return ERR_CONN on one of the first lines:

  LWIP_ERROR("netconn_recv: invalid recvmbox",
sys_mbox_valid(&conn->recvmbox), return ERR_CONN;);

This should actually pass, and then netconn_recv_data is called. In there, we
check:

    if (!sys_mbox_valid(&conn->recvmbox)) {
      /* This happens when calling this function after receiving FIN */
      return sys_mbox_valid(&conn->acceptmbox) ? ERR_CONN : ERR_CLSD;
    }

But in neither of both cases do we set last_err. So when I call
netconn_err(pxNetconn) I still get ERR_OK.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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