Commit 30816d9a authored by guoweis's avatar guoweis Committed by Commit bot

Only allow temporary IPv6 address.

BUG=413437

Review URL: https://codereview.chromium.org/990503002

Cr-Commit-Position: refs/heads/master@{#319596}
parent a78caa3b
......@@ -88,6 +88,14 @@ void IpcNetworkManager::OnNetworkListChanged(
network->AddIP(rtc::IPAddress(address));
networks.push_back(network);
} else if (it->address.size() == net::kIPv6AddressSize) {
// Only allow temporary non-deprecated address to ensure the MAC is not
// included in the address.
if (!(it->ip_address_attributes & net::IP_ADDRESS_ATTRIBUTE_TEMPORARY) ||
(it->ip_address_attributes & net::IP_ADDRESS_ATTRIBUTE_DEPRECATED)) {
continue;
}
in6_addr address;
memcpy(&address, &it->address[0], sizeof(in6_addr));
rtc::IPAddress ip6_addr(address);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment