diff --git a/src/utils/Platform.cpp b/src/utils/Platform.cpp index 5dc21dff..0fb0be9b 100644 --- a/src/utils/Platform.cpp +++ b/src/utils/Platform.cpp @@ -35,9 +35,9 @@ std::string Utils::Platform::GetLocalAddress() std::vector> preferredAddresses; for (auto address : validAddresses) { // Attribute a priority (0 is best) to the address to choose the best picks - if (address.startsWith("192.168.1") || address.startsWith("192.168.0")) { // Prefer common consumer router network prefixes + if (address.startsWith("192.168.1.") || address.startsWith("192.168.0.")) { // Prefer common consumer router network prefixes preferredAddresses.push_back(std::make_pair(address, 0)); - } else if (address.startsWith("172.16")) { // Slightly less common consumer router network prefixes + } else if (address.startsWith("172.16.")) { // Slightly less common consumer router network prefixes preferredAddresses.push_back(std::make_pair(address, 1)); } else if (address.startsWith("10.")) { // Even less common consumer router network prefixes preferredAddresses.push_back(std::make_pair(address, 2));