mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
fix(openthread): Add check for ip address in DNS external resolve hook
This commit is contained in:
parent
c4dad9381f
commit
b2f25ae9d6
@ -105,7 +105,7 @@ static void dns_found_handler(const char *name, const ip_addr_t *ipaddr, void *c
|
|||||||
{
|
{
|
||||||
dns_resolve_entry_t *resolve_entry = (dns_resolve_entry_t *)callback_arg;
|
dns_resolve_entry_t *resolve_entry = (dns_resolve_entry_t *)callback_arg;
|
||||||
if (resolve_entry && resolve_entry->found) {
|
if (resolve_entry && resolve_entry->found) {
|
||||||
if (lwip_strnicmp(name, resolve_entry->name, sizeof(resolve_entry->name)) == 0) {
|
if (ipaddr && lwip_strnicmp(name, resolve_entry->name, sizeof(resolve_entry->name)) == 0) {
|
||||||
ip_addr_t ipaddr_copy = *ipaddr;
|
ip_addr_t ipaddr_copy = *ipaddr;
|
||||||
ip6_addr_t nat64_prefix;
|
ip6_addr_t nat64_prefix;
|
||||||
if (ipaddr_copy.type == IPADDR_TYPE_V4 && esp_openthread_get_nat64_prefix(&nat64_prefix) == ESP_OK) {
|
if (ipaddr_copy.type == IPADDR_TYPE_V4 && esp_openthread_get_nat64_prefix(&nat64_prefix) == ESP_OK) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user