diff options
author | guoweis <guoweis@chromium.org> | 2015-03-08 10:44:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-08 17:44:45 +0000 |
commit | 30816d9aa5e2a8143d16dfb3f8110ff458c7354f (patch) | |
tree | efd336b20a00915d8af2f1c0ed14576625384d17 | |
parent | a78caa3b90acc4d5d33f905f9cae774d9605d029 (diff) | |
download | chromium_src-30816d9aa5e2a8143d16dfb3f8110ff458c7354f.zip chromium_src-30816d9aa5e2a8143d16dfb3f8110ff458c7354f.tar.gz chromium_src-30816d9aa5e2a8143d16dfb3f8110ff458c7354f.tar.bz2 |
Only allow temporary IPv6 address.
BUG=413437
Review URL: https://codereview.chromium.org/990503002
Cr-Commit-Position: refs/heads/master@{#319596}
-rw-r--r-- | content/renderer/p2p/ipc_network_manager.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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); |