dhcp: Use DHCP_MAX_MSG_LEN_MIN_REQUIRED instead of hard-coded value

Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
Axel Lin 2016-10-24 17:51:21 +08:00 committed by Dirk Ziegelmeier
parent c4eb52dcff
commit d5dd5241e7

View File

@ -1225,7 +1225,7 @@ dhcp_reboot(struct netif *netif)
result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST);
if (result == ERR_OK) {
dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
dhcp_option_short(dhcp, 576);
dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN_MIN_REQUIRED);
dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4);
dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));