buglwIP - A Lightweight TCP/IP stack - Bugs: bug #32926, TCP_RMV(&tcp_bound_pcbs) is...

 
 

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

bug #32926: TCP_RMV(&tcp_bound_pcbs) is called on unbound tcp pcbs.

Submitter:  Simon Goldschmidt <goldsimon>
Submitted:  Sun 27 Mar 2011 12:33:35 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

Sun 27 Mar 2011 05:18:03 PM UTC, comment #1: 

Fixed by checking if the pcb was bound (local_port != 0).

Simon Goldschmidt <goldsimon>
Group administrator
Sun 27 Mar 2011 12:33:35 PM UTC, original submission:  

Found by Tomas Hruby on lwip-users:
If TCP_DEBUG_PCB_LISTS==1 and the tcp_bound_pcbs pointer is NULL, an ASSERT triggers for this code:

struct tcp_pcb t = tcp_new();
tcp_close(t);

The reason is that we have no state difference between CLOSED and BOUND.

To solve this, we should check if 'pcb->local_port' is != 0 before trying to remove a pcb from tcp_bound_pcbs.

With TCP_DEBUG_PCB_LISTS==0 (the default), this goes unnoticed.

Simon Goldschmidt <goldsimon>
Group administrator

 

(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 (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-03-27 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code