Don't try to get IPv6 addresses when disabled (#6366)

This commit is contained in:
Jimmy Hedman 2024-03-14 21:26:29 +01:00 committed by GitHub
parent d3842a7ab4
commit 4e850c3f32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -157,7 +157,7 @@ network::IPAddresses WiFiComponent::wifi_sta_ip_addresses() {
} else {
addresses[0] = network::IPAddress(&ip.ip);
}
#if LWIP_IPV6
#if USE_NETWORK_IPV6
ip6_addr_t ipv6;
err = tcpip_adapter_get_ip6_global(TCPIP_ADAPTER_IF_STA, &ipv6);
if (err != ESP_OK) {
@ -171,7 +171,7 @@ network::IPAddresses WiFiComponent::wifi_sta_ip_addresses() {
} else {
addresses[2] = network::IPAddress(&ipv6);
}
#endif /* LWIP_IPV6 */
#endif /* USE_NETWORK_IPV6 */
return addresses;
}