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 Jesse Hills
parent 92fbc61c46
commit ca85a41a72
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

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