Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: content/renderer/p2p/ipc_network_manager.cc

Issue 990503002: Only allow temporary IPv6 address. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/p2p/ipc_network_manager.cc
diff --git a/content/renderer/p2p/ipc_network_manager.cc b/content/renderer/p2p/ipc_network_manager.cc
index ac7661209b516e1106ea249b8c002ffeb83ddfbf..ad62327b19612e3aa34060fcec540ef25eb8beb1 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698