Provide IP address candidate list for LAN upgrade.

PiperOrigin-RevId: 825584250
This commit is contained in:
Francis Tsui
2025-10-29 09:37:19 -07:00
committed by Copybara-Service
parent 389a1bc151
commit 8622fe7bf5
20 changed files with 163 additions and 50 deletions
@@ -45,10 +45,7 @@ WifiLanServerSocket::~WifiLanServerSocket() { Close(); }
// Returns the first IP address.
std::string WifiLanServerSocket::GetIPAddress() const {
// The result of this function is used in BWU to let the remote side know
// which IP to connect to.
// server_socket_ is not bound to any addresses. So we need to pick an
// IP address from the list of available addresses.
// Just pick an IP address from the list of available addresses.
std::vector<std::string> ip_addresses = GetIpv4Addresses();
if (ip_addresses.empty()) {
LOG(ERROR) << "No IP addresses found.";