mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 17:54:13 +01:00
Don't try to get IPv6 addresses when disabled (#6366)
This commit is contained in:
parent
d3842a7ab4
commit
4e850c3f32
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue