From 30816d9aa5e2a8143d16dfb3f8110ff458c7354f Mon Sep 17 00:00:00 2001 From: guoweis Date: Sun, 8 Mar 2015 10:44:06 -0700 Subject: Only allow temporary IPv6 address. BUG=413437 Review URL: https://codereview.chromium.org/990503002 Cr-Commit-Position: refs/heads/master@{#319596} --- content/renderer/p2p/ipc_network_manager.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/renderer/p2p/ipc_network_manager.cc b/content/renderer/p2p/ipc_network_manager.cc index ac76612..ad62327 100644 --- a/content/renderer/p2p/ipc_network_manager.cc +++ b/content/renderer/p2p/ipc_network_manager.cc @@ -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); -- cgit v1.1