mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
lwip: Fixed that ipv6 dns cannot work
This commit is contained in:
parent
cf3b9c0ef4
commit
ceb6a812b4
@ -1328,8 +1328,9 @@ static esp_err_t esp_netif_set_dns_info_api(esp_netif_api_msg_t *msg)
|
|||||||
ESP_LOGD(TAG, "set dns if=%p type=%d dns=%x", esp_netif, type, dns->ip.u_addr.ip4.addr);
|
ESP_LOGD(TAG, "set dns if=%p type=%d dns=%x", esp_netif, type, dns->ip.u_addr.ip4.addr);
|
||||||
|
|
||||||
ip_addr_t *lwip_ip = (ip_addr_t*)&dns->ip;
|
ip_addr_t *lwip_ip = (ip_addr_t*)&dns->ip;
|
||||||
lwip_ip->type = IPADDR_TYPE_V4;
|
if (!IP_IS_V4(lwip_ip) && !IP_IS_V6(lwip_ip)) {
|
||||||
|
lwip_ip->type = IPADDR_TYPE_V4;
|
||||||
|
}
|
||||||
if (esp_netif->flags & ESP_NETIF_DHCP_SERVER) {
|
if (esp_netif->flags & ESP_NETIF_DHCP_SERVER) {
|
||||||
// if DHCP server configured to set DNS in dhcps API
|
// if DHCP server configured to set DNS in dhcps API
|
||||||
if (type != ESP_NETIF_DNS_MAIN) {
|
if (type != ESP_NETIF_DNS_MAIN) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user