diff options
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r-- | networking/udhcp/dhcpc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 4b23e4d39..dcec8cdfd 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -531,7 +531,7 @@ static char **fill_envp(struct dhcp_packet *packet) | |||
531 | temp = udhcp_get_option(packet, code); | 531 | temp = udhcp_get_option(packet, code); |
532 | *curr = xmalloc_optname_optval(temp, &dhcp_optflags[i], opt_name); | 532 | *curr = xmalloc_optname_optval(temp, &dhcp_optflags[i], opt_name); |
533 | putenv(*curr++); | 533 | putenv(*curr++); |
534 | if (code == DHCP_SUBNET) { | 534 | if (code == DHCP_SUBNET && temp[-OPT_DATA + OPT_LEN] == 4) { |
535 | /* Subnet option: make things like "$ip/$mask" possible */ | 535 | /* Subnet option: make things like "$ip/$mask" possible */ |
536 | uint32_t subnet; | 536 | uint32_t subnet; |
537 | move_from_unaligned32(subnet, temp); | 537 | move_from_unaligned32(subnet, temp); |
@@ -1691,7 +1691,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1691 | * They say ISC DHCP client supports this case. | 1691 | * They say ISC DHCP client supports this case. |
1692 | */ | 1692 | */ |
1693 | server_addr = 0; | 1693 | server_addr = 0; |
1694 | temp = udhcp_get_option(&packet, DHCP_SERVER_ID); | 1694 | temp = udhcp_get_option32(&packet, DHCP_SERVER_ID); |
1695 | if (!temp) { | 1695 | if (!temp) { |
1696 | bb_error_msg("no server ID, using 0.0.0.0"); | 1696 | bb_error_msg("no server ID, using 0.0.0.0"); |
1697 | } else { | 1697 | } else { |
@@ -1718,7 +1718,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1718 | struct in_addr temp_addr; | 1718 | struct in_addr temp_addr; |
1719 | uint8_t *temp; | 1719 | uint8_t *temp; |
1720 | 1720 | ||
1721 | temp = udhcp_get_option(&packet, DHCP_LEASE_TIME); | 1721 | temp = udhcp_get_option32(&packet, DHCP_LEASE_TIME); |
1722 | if (!temp) { | 1722 | if (!temp) { |
1723 | bb_error_msg("no lease time with ACK, using 1 hour lease"); | 1723 | bb_error_msg("no lease time with ACK, using 1 hour lease"); |
1724 | lease_seconds = 60 * 60; | 1724 | lease_seconds = 60 * 60; |
@@ -1813,7 +1813,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1813 | uint32_t svid; | 1813 | uint32_t svid; |
1814 | uint8_t *temp; | 1814 | uint8_t *temp; |
1815 | 1815 | ||
1816 | temp = udhcp_get_option(&packet, DHCP_SERVER_ID); | 1816 | temp = udhcp_get_option32(&packet, DHCP_SERVER_ID); |
1817 | if (!temp) { | 1817 | if (!temp) { |
1818 | non_matching_svid: | 1818 | non_matching_svid: |
1819 | log1("received DHCP NAK with wrong" | 1819 | log1("received DHCP NAK with wrong" |