*** From dhcp-server -- To unsubscribe, see the end of this message. ***
> parse_options_buffer malloc()'s memory for every option it finds. This
> memory is never free()'d. The result is a memory leak of some number of
> bytes per request received (unless all your requests are BootP requests
> with no options).
This is fixed in the latest 2.0 patchlevel, but not in 1.0. If
there's still demand for 1.0 patchlevels, I'd be more than happy to
cut a new one with this fixed.
> (After developing this patch, I became concerned that the code might, when
> storing the uid (client identifier) in the lease structure, simply update a
> pointer in the lease structure to point to the memory allocated for that
> option by parse_option_buffer. This turns out to be the case, but, after
> doing so (in ack_lease), the code proceeds to set the relevant pointer in
> the packet structure to NULL, which prevents it from being free()'d by my
> new code above.)
2.0 and 3.0 actually allocate new buffers, because I was feeling
paranoid about the aforementioned hack - I am thinking of having
parse_options not allocate memory at all other than the packet input
buffer, in which case stealing pointers from it would be a no-no.
> The nature of my network is such that I have about 80000 host declarations
> in my dhcpd.conf. The host_decl structure is about 32 bytes or so.
> 80000*32=2.5MB. No big deal. But the group structure is about 1K, and the
> code allocates a group structure for every static host, even if the static
> host doesn't have anything different from it's parent.
Yup. Have you tried 3.0, BTW? I know you wouldn't want to run it
in production, but I'd be very interested to see what its memory
footprint looks like with that big of a static database.
> The DHCP side will use the mask from the "subnet a.b.c.d netmask e.f.g.h"
> declaration. The BootP code, though, requires "option subnet-mask". The
> patch below makes BootP work the same as DHCP with respect to this.
Good idea. I've fixed this in all three release trees.
Thanks for the bug report and the patches!
_MelloN_
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dhcp/lists
If you are without web access, or if you are having trouble with the web page,
please send mail to [EMAIL PROTECTED] Please try to use the web
page first - it will take a long time for your request to be processed by hand.
------------------------------------------------------------------------------