dns: Fix server_idx increasing to DNS_MAX_SERVERS and trigger the LWIP_ASSERT

ESP specific patch

Picked from espressif/esp-lwip@5a567d52
Ref IDF-4839
This commit is contained in:
yuanjm
2021-04-22 14:47:18 +08:00
committed by David Cermak
parent 223101f1ed
commit 9247429ee4
+2 -2
View File
@@ -1073,8 +1073,8 @@ dns_check_entry(u8_t i)
entry->tmr = 1;
entry->retries = 0;
#if ESP_DNS
while((entry->server_idx < DNS_MAX_SERVERS) && ip_addr_isany_val(dns_servers[entry->server_idx])) {
entry->server_idx++;
while((entry->server_idx + 1 < DNS_MAX_SERVERS) && ip_addr_isany_val(dns_servers[entry->server_idx])) {
entry->server_idx ++;
}
#endif
/* send DNS packet for this entry */