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

Submitted by:  Yoav <djinng>
Submitted on:  Wed 09 Feb 2011 01:30:06 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned 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>
Project AdministratorIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 24 Aug 2011 08:04:09 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1