memory corruption with udhcpc
Thomas Andrews
tandrews at grok.co.za
Thu Oct 13 13:40:34 UTC 2005
Hi,
I've made the following addition to networking/udhcp/options.c
{"staticrte", OPTION_IP_PAIR | OPTION_LIST | OPTION_REQ, 0x021},
When I get the DHCP server to supply one IP:gateway pair there is no
problem, but when I supply two pairs I get the following error:
*** glibc detected *** malloc(): memory corruption: 0x0806ee48 ***
0x21 is DHCP option 33 which is "static routes", and is expected to look
something like this: host-ip, gateway-ip eg:
10.5.5.1, 10.1.1.1
I am using dnsmasq as the DHCP server, and I can see that the packets
are correctly formatted using ethereal. (In both cases.)
If I use OPTION_IP instead of OPTION_IP_PAIR, I do not have any problems
at all, no matter whether I have a single pair or more.
What can be the problem here ?
FYI this line is added to dnsmasq.conf to get dnsmasq to supply routes:
dhcp-option=33,10.5.5.1,10.1.1.1,10.5.5.2,10.11.11.1
Many thanks,
Thomas
More information about the busybox
mailing list