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

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

Issue 536133003: MergeNetworkList can't group address under the same interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « content/common/p2p_messages.h ('k') | 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 8995339cb58796abb7447c0cdbcc03ab2079e3be..e97d5a6dc7353f80aa650728a7f40d96a44de807 100644
--- a/content/renderer/p2p/ipc_network_manager.cc
+++ b/content/renderer/p2p/ipc_network_manager.cc
@@ -84,8 +84,10 @@ void IpcNetworkManager::OnNetworkListChanged(
uint32 address;
memcpy(&address, &it->address[0], sizeof(uint32));
address = rtc::NetworkToHost32(address);
+ rtc::IPAddress prefix = rtc::TruncateIP(rtc::IPAddress(address),
Sergey Ulanov 2014/09/03 22:55:22 Do you really need to truncate the prefix? Shouldn
guoweis_webrtc 2014/09/03 22:58:14 Yes, I do want to truncate the address. Network is
juberti2 2014/09/03 23:11:02 It does seem unnecessary to pass both |prefix| and
+ it->network_prefix);
rtc::Network* network = new rtc::Network(
- it->name, it->name, rtc::IPAddress(address), 32,
+ it->name, it->name, prefix, it->network_prefix,
ConvertConnectionTypeToAdapterType(it->type));
network->AddIP(rtc::IPAddress(address));
networks.push_back(network);
@@ -95,8 +97,10 @@ void IpcNetworkManager::OnNetworkListChanged(
memcpy(&address, &it->address[0], sizeof(in6_addr));
rtc::IPAddress ip6_addr(address);
if (!rtc::IPIsPrivate(ip6_addr)) {
+ rtc::IPAddress prefix = rtc::TruncateIP(rtc::IPAddress(ip6_addr),
+ it->network_prefix);
rtc::Network* network = new rtc::Network(
- it->name, it->name, ip6_addr, 64,
+ it->name, it->name, prefix, it->network_prefix,
ConvertConnectionTypeToAdapterType(it->type));
network->AddIP(ip6_addr);
networks.push_back(network);
« no previous file with comments | « content/common/p2p_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698