mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/tcpip_adapter_set_ip_info' into 'master'
Fix set static IP address issue Set static IP address, clear current DNS servers default. See merge request !310
This commit is contained in:
commit
cca883490e
@ -25,6 +25,9 @@
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/ip6_addr.h"
|
||||
#include "lwip/nd6.h"
|
||||
#if LWIP_DNS /* don't build if not configured for use in lwipopts.h */
|
||||
#include "lwip/dns.h"
|
||||
#endif
|
||||
#include "netif/wlanif.h"
|
||||
#include "netif/ethernetif.h"
|
||||
|
||||
@ -229,6 +232,12 @@ esp_err_t tcpip_adapter_set_ip_info(tcpip_adapter_if_t tcpip_if, tcpip_adapter_i
|
||||
if (status != TCPIP_ADAPTER_DHCP_STOPPED) {
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPPED;
|
||||
}
|
||||
#if LWIP_DNS /* don't build if not configured for use in lwipopts.h */
|
||||
u8_t numdns = 0;
|
||||
for (numdns = 0; numdns < DNS_MAX_SERVERS; numdns ++) {
|
||||
dns_setserver(numdns, NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ip4_addr_copy(esp_ip[tcpip_if].ip, ip_info->ip);
|
||||
|
Loading…
Reference in New Issue
Block a user