Re: dhcpcd v6.7.1 'realloc() error"
Roy Marples
Sat Sep 19 11:15:35 2015
Hi David
On 18/09/2015 22:58, David Hauck wrote:
> I've recently turned on a couple DHCPv4 scope options in the Win2012
> DHCP Server that our 'dhcpcd' clients talk to. Unfortunately this has
> resulted in the following dhcpcd error (and termination):
>
> *** Error in `dhcpcd': realloc(): invalid next size: 0x0942d820 ***
>
> When I remove these options and reboot (restart dhcpcd) the error
> goes away and 'dhcpcd' is back to normal. As a result I need to
> either turn off DHCP completely on our 'dhcpcd' targets or remove the
> problematic DHCPv4 server scope options.
>
> The two scope options are: 066 Boot Server Hostname (value is an IP
> address) 067 Bootfile Name (value is "pxelinux.0")
>
> Any ideas?
The problem is two fold. Firstly, option 66 should be a string and not
an ip address - unless you are encoding the ip address as a string (such
as "12.34.56.78" which should work).
Secondly, if the above is correct there is an error with the option
parser when it discovers an incorrect value which needs fixing!
> PS: Other DHCP clients seem fine with these scope options (i.e.,
> Windows DHCP client, the Linux kernel when configured for autoip via
> DHCP, etc.).
That's fine and I'm sure we can make dhcpcd work as well!
We might even be able to do it just by overloading some settings in
dhcpcd.conf - try this
define 66 string tftp_server_name
If that fails, try this:
define 66 binhex tftp_server_name
define 67 binhex bootfile_name
That should at least "work" as in dhcpcd no longer crashes, but the
values passed to dhcpcd-run-hooks would be useless.
I'll try and setup a test case later tonight, but if in the meantime you
can collect a full tcpdump of the DHCP message causing the problem, that
might help speed things up, or at least clarify where the error is.
Thanks
Roy
Archive administrator: postmaster@marples.name