Skip to content

Commit

Permalink
Fix has ipv6 address check
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Feb 24, 2025
1 parent 90ee1ea commit eb2c547
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,15 @@ CHIP_ERROR ConnectToAccessPoint()
#if CHIP_DEVICE_CONFIG_ENABLE_IPV4
bool HasAnIPv4Address()
{
VerifyOrReturnError(which_if == SL_WFX_STA_INTERFACE, false);
return wfx_rsi.dev_state.Has(WifiState::kStationDhcpDone);
}
#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */

bool HasAnIPv6Address()
{
return wfx_rsi.dev_state.Has(WifiState::kStationDhcpDone);
// TODO: WifiState::kStationConnected does not guarantee SLAAC IPv6 LLA, maybe use a different FLAG
// Once connect is sync instead of async, this should be fine
return wfx_rsi.dev_state.Has(WifiState::kStationConnected);
}

void CancelScanNetworks()
Expand Down

0 comments on commit eb2c547

Please sign in to comment.