fix a long standing underallocation bug
This commit is contained in:
parent
a8992635b1
commit
d242e49c89
@ -146,8 +146,11 @@ static char **fill_envp(struct dhcpMessage *packet)
|
||||
num_options = 0;
|
||||
else {
|
||||
for (i = 0; dhcp_options[i].code; i++)
|
||||
if (get_option(packet, dhcp_options[i].code))
|
||||
if (get_option(packet, dhcp_options[i].code)) {
|
||||
num_options++;
|
||||
if (dhcp_options[i].code == DHCP_SUBNET)
|
||||
num_options++; /* for mton */
|
||||
}
|
||||
if (packet->siaddr) num_options++;
|
||||
if ((temp = get_option(packet, DHCP_OPTION_OVER)))
|
||||
over = *temp;
|
||||
|
Loading…
Reference in New Issue
Block a user