lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: [lwip] lwip 0.4.2: missing mem_free() with broadcasts?


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] lwip 0.4.2: missing mem_free() with broadcasts?
Date: Thu, 09 Jan 2003 00:18:06 -0000

Hi!

On Tuesday 27 November 2001 19.22, you wrote:
> Today I'm putting the system in a bigger ethernet environment and found
> that incoming BROADCAST messages allocates memory from pool which will
> never be freed!

You just found an ugly bug - broadcast pbufs were never deallocated with IP 
forwarding turned on!

The short term solution is to turn of IP forwarding in lwipopts.h, the long 
term solution is to go for pre-0.5. I just found a few other bugs pertaining 
to broadcasts (such as responding to broadcast pings - the so-called smurf 
DDoS attack).

> "mem usages:" comes from adam's mem_debug_print() -a little bit
> changed-, each digits gives the number of allocations in a 256 byte
> memory block.

Are you allocating heap memory for incoming pbufs (i.e., pbuf type PBUF_RAM)?

> Should I switch to new pre-0.5 stack (cvs stack)?

It is probably best, since there are other just-fixed bugs that are present 
in 0.4.2. The biggest problem with migrating from 0.4.x to 0.5 is the 
required changes in the sys_arch - see the thread on the new sys_arch for 0.5 
(http://www.sics.se/~adam/lwip/maillist/msg00155.html). If you are not using 
the sequential API, it should be possible to replace the new 0.5 sys.c and 
the sys_arch.c with the old 0.4.x style sys_arch.c.

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~ada
[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]