Don't test for IPv6 addresses when min_ipv6_addr_count is 0 (#7037)

This commit is contained in:
Colm 2024-07-06 08:02:41 +01:00 committed by GitHub
parent ddaa84683b
commit 4c6a17e304
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -757,7 +757,7 @@ void WiFiComponent::wifi_process_event_(IDFWiFiEvent *data) {
WiFiSTAConnectStatus WiFiComponent::wifi_sta_connect_status_() {
if (s_sta_connected && this->got_ipv4_address_) {
#if USE_NETWORK_IPV6
#if USE_NETWORK_IPV6 && (USE_NETWORK_MIN_IPV6_ADDR_COUNT > 0)
if (this->num_ipv6_addresses_ >= USE_NETWORK_MIN_IPV6_ADDR_COUNT) {
return WiFiSTAConnectStatus::CONNECTED;
}