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

Submitter:  Frédéric Bernon <fbernon>
Submitted:  Wed 23 May 2007 09:04:51 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  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>
Group Member
Wed 23 May 2007 09:27:13 AM UTC, comment #1: 

As I said on lwip-devel: I agree

Simon Goldschmidt <goldsimon>
Group 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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    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.13-4448.
    Corresponding source code