fix the dhcps default behaviour chenged by dns

Closes https://github.com/espressif/esp-idf/issues/1285
This commit is contained in:
zhangyanjiao 2017-11-28 16:14:35 +08:00
parent 0554bc59a2
commit e315d7ca08
2 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ static bool renew = false;
static dhcps_lease_t dhcps_poll;
static dhcps_time_t dhcps_lease_time = DHCPS_LEASE_TIME_DEF; //minute
static dhcps_offer_t dhcps_offer = 0xFF;
static dhcps_offer_t dhcps_dns = 0xFF;
static dhcps_offer_t dhcps_dns = 0x00;
/******************************************************************************
* FunctionName : dhcps_option_info

View File

@ -408,7 +408,7 @@ esp_err_t tcpip_adapter_set_ip_info(tcpip_adapter_if_t tcpip_if, tcpip_adapter_i
if (p_netif != NULL && netif_is_up(p_netif)) {
netif_set_addr(p_netif, &ip_info->ip, &ip_info->netmask, &ip_info->gw);
if (!(ip4_addr_isany_val(ip_info->ip) || ip4_addr_isany_val(ip_info->ip) || ip4_addr_isany_val(ip_info->ip))) {
if (!(ip4_addr_isany_val(ip_info->ip) || ip4_addr_isany_val(ip_info->netmask) || ip4_addr_isany_val(ip_info->gw))) {
system_event_t evt;
evt.event_id = SYSTEM_EVENT_STA_GOT_IP;
evt.event_info.got_ip.ip_changed = false;