Skip to content

Commit

Permalink
Merge branch 'bugfix/stop_dhcps_before_set_dns_4.4' into 'release/v4.4'
Browse files Browse the repository at this point in the history
Fixed bug for stop dhcps before set dns for 4.4

See merge request espressif/esp-idf!23048
  • Loading branch information
jack0c committed Apr 4, 2023
2 parents 6852aaa + 2549b9f commit 534ec69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/mesh/ip_internal_network/main/mesh_netif.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ static esp_err_t set_dhcps_dns(esp_netif_t *netif, uint32_t addr)
dns.ip.u_addr.ip4.addr = addr;
dns.ip.type = IPADDR_TYPE_V4;
dhcps_offer_t dhcps_dns_value = OFFER_DNS;
ESP_ERROR_CHECK_WITHOUT_ABORT(esp_netif_dhcps_stop(netif));
ESP_ERROR_CHECK(esp_netif_dhcps_option(netif, ESP_NETIF_OP_SET, ESP_NETIF_DOMAIN_NAME_SERVER, &dhcps_dns_value, sizeof(dhcps_dns_value)));
ESP_ERROR_CHECK(esp_netif_set_dns_info(netif, ESP_NETIF_DNS_MAIN, &dns));
ESP_ERROR_CHECK_WITHOUT_ABORT(esp_netif_dhcps_start(netif));
return ESP_OK;
}

Expand Down

0 comments on commit 534ec69

Please sign in to comment.