Memory footprint of dhcpd process steadily increasing

sthaug at nethelp.no sthaug at nethelp.no
Sun Apr 19 10:56:01 UTC 2009


> > Turns out it's load_balance_mine(), taking a reference on the client
> > identifier option (which references the options buffer) and not giving
> > it up.  This only happens on DHCPDISCOVERs with client identifiers
> > ("Windows boxes"), while using failover in the normal state, possibly
> > a very slow leak for many people.  It's a one-line fix for anyone who
> > knows where to look.
...
> I've had a look at the code in failover.c, but I'm not good at 
> programming at all. Could you please tell us non programming people 
> exactly what line goes in where in the code?

As far as I can see it should be something like the following. I am
testing 4.1.1b1 with this patch now.

Steinar Haug, Nethelp consulting, sthaug at nethelp.no
----------------------------------------------------------------------
*** failover.c.orig	Wed Sep 24 18:18:56 2008
--- failover.c	Sun Apr 19 12:30:29 2009
***************
*** 5729,5734 ****
--- 5729,5735 ----
  				   packet -> options, (struct option_state *)0,
  				   &global_scope, oc, MDL)) {
  		hbaix = loadb_p_hash (ds.data, ds.len);
+ 		data_string_forget (&ds, MDL);
  	} else {
  		hbaix = loadb_p_hash (packet -> raw -> chaddr,
  				      packet -> raw -> hlen);



More information about the dhcp-users mailing list