Skip to content

Commit 4350fdf

Browse files
authored
Fix indexing in DNS server IP address retrieval #17751
1 parent ab14938 commit 4350fdf

File tree

1 file changed

+1
-1
lines changed
  • examples/protocols/http_server/captive_portal/components/dns_server

1 file changed

+1
-1
lines changed

examples/protocols/http_server/captive_portal/components/dns_server/dns_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int parse_dns_request(char *req, size_t req_len, char *dns_reply, size_t
158158
esp_netif_get_ip_info(esp_netif_get_handle_from_ifkey(h->entry[i].if_key), &ip_info);
159159
ip.addr = ip_info.ip.addr;
160160
break;
161-
} else if (h->entry->ip.addr != IPADDR_ANY) {
161+
} else if (h->entry[i].ip.addr != IPADDR_ANY) {
162162
ip.addr = h->entry[i].ip.addr;
163163
break;
164164
}

0 commit comments

Comments
 (0)