1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-07 06:01:35 +03:00

AP & dhcp-server: fix uninitialized variables (#7905)

This commit is contained in:
david gauchard
2021-03-03 01:12:01 +01:00
committed by GitHub
parent e3fe7a5776
commit 807ed51d0f
2 changed files with 3 additions and 10 deletions

View File

@ -1140,16 +1140,9 @@ bool DhcpServer::set_dhcps_lease(struct dhcps_lease *please)
// logic below is subject for improvement
// - is wrong
// - limited to /24 address plans
#if 1
softap_ip = ip_2_ip4(&_netif->ip_addr)->addr;
#else
struct ip_info info;
bzero(&info, sizeof(struct ip_info));
wifi_get_ip_info(SOFTAP_IF, &info);
softap_ip = htonl(info.ip.addr);
softap_ip = htonl(ip_2_ip4(&_netif->ip_addr)->addr);
start_ip = htonl(please->start_ip.addr);
end_ip = htonl(please->end_ip.addr);
#endif
/*config ip information can't contain local ip*/
if ((start_ip <= softap_ip) && (softap_ip <= end_ip))
{