patchlwIP - A Lightweight TCP/IP stack - Patches: patch #5957, Safe-thread problem inside...


You are not allowed to post comments on this tracker with your current authentication level.

patch #5957: Safe-thread problem inside netconn_recv

Submitted by:  Frédéric Bernon <fbernon>
Submitted on:  Wed 23 May 2007 09:04:51 AM UTC  
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Frédéric Bernon <fbernon> Open/Closed:  Closed
Planned Release:  None

Wed 23 May 2007 05:54:14 PM UTC, comment #2: 

Ok, because no objects, and pretty simple, it's check in and closed.

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.
Wed 23 May 2007 09:27:13 AM UTC, comment #1: 

As I said on lwip-devel: I agree

Simon Goldschmidt <goldsimon>
Project Administrator
Wed 23 May 2007 09:04:51 AM UTC, original submission:  

In a NETCONN_TCP connection, if an TCP error happens, tcpip_thread will call err_tcp, which post a NULL message to conn->recvmbox. When the application side fetch the NULL message, it close the recvmbox and set it to SYS_MBOX_NULL. It seems safer to only set the conn->err to ERR_CLSD to notify the application, and to let it close the connection (which will "drain" any other message in a safer way). In netconn_recv, the modification will be :

if (p == NULL) {
  memp_free(MEMP_NETBUF, buf);
  conn->err = ERR_CLSD;
  return NULL;

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by fbernon (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-23 fbernon StatusNone => Done
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5