buglwIP - A Lightweight TCP/IP stack - Bugs: bug #32397, Resources are not freed when...

 
 

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

bug #32397: Resources are not freed when netif's go down or are removed

Submitter:  Yoav <djinng>
Submitted:  Wed 09 Feb 2011 01:30:06 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  Other

Wed 24 Aug 2011 08:04:09 PM UTC, comment #1: 

Fixed by adding netif->remove_callback and netif_set_remove_callback().

Simon Goldschmidt <goldsimon>
Group administrator
Wed 09 Feb 2011 01:30:06 PM UTC, original submission:  

When disabling a netif using netif_set_down(), and when removing a netif using netif_remove(), associated resources are not cleaned up.

After several such iterations, the stack can easily run out of resources (e.g pbufs).

A section of code introduced in 2003 into netif_set_ipaddr() does exactly that.
This code with some modifications should IMO be applied to netif_set_down() (which will be automatically called when removing a netif)
The modifications should include removing relevant PCBs from bound, time_wait and listening queues as well as the active queue.
If any other resources are linked to a netif somehow, they should be cleaned up as well.

p.s Although the typical scenario for lwIP may not include lowering and/or removing interfaces very often (or at all), the impact - especially when using PPP - is considerable.

Yoav <djinng>

 

(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 djinng (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-08-24 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code