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

Unified Diff: webrtc/pc/peerconnection.cc

Issue 2731813002: Add the option to disable IPv6 ICE candidates on WiFi (Closed)
Patch Set: Fix the rtc_unittests Created 3 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
Index: webrtc/pc/peerconnection.cc
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc
index 48ffebe222d1c6482d81e27d244ee6f4e79dbc25..1579845ff9c601b1f7842844e5cf98dbe75eccc0 100644
--- a/webrtc/pc/peerconnection.cc
+++ b/webrtc/pc/peerconnection.cc
@@ -477,6 +477,7 @@ bool PeerConnectionInterface::RTCConfiguration::operator==(
bool prioritize_most_likely_ice_candidate_pairs;
struct cricket::MediaConfig media_config;
bool disable_ipv6;
+ bool disable_ipv6_on_wifi;
bool enable_rtp_data_channel;
bool enable_quic;
rtc::Optional<int> screencast_min_bitrate;
@@ -509,6 +510,7 @@ bool PeerConnectionInterface::RTCConfiguration::operator==(
prioritize_most_likely_ice_candidate_pairs ==
o.prioritize_most_likely_ice_candidate_pairs &&
media_config == o.media_config && disable_ipv6 == o.disable_ipv6 &&
+ disable_ipv6_on_wifi == o.disable_ipv6_on_wifi &&
enable_rtp_data_channel == o.enable_rtp_data_channel &&
enable_quic == o.enable_quic &&
screencast_min_bitrate == o.screencast_min_bitrate &&
@@ -2505,7 +2507,8 @@ bool PeerConnection::InitializePortAllocator_n(
// enable BUNDLE here.
int portallocator_flags = port_allocator_->flags();
portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET |
- cricket::PORTALLOCATOR_ENABLE_IPV6;
+ cricket::PORTALLOCATOR_ENABLE_IPV6 |
+ cricket::PORTALLOCATOR_ENABLE_IPV6_ON_WIFI;
// If the disable-IPv6 flag was specified, we'll not override it
// by experiment.
if (configuration.disable_ipv6) {
@@ -2515,6 +2518,11 @@ bool PeerConnection::InitializePortAllocator_n(
portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
}
+ if (configuration.disable_ipv6_on_wifi) {
+ portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6_ON_WIFI);
+ LOG(LS_INFO) << "IPv6 candidates on Wi-Fi are disabled.";
+ }
+
if (configuration.tcp_candidate_policy == kTcpCandidatePolicyDisabled) {
portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_TCP;
LOG(LS_INFO) << "TCP candidates are disabled.";
« no previous file with comments | « webrtc/p2p/client/basicportallocator_unittest.cc ('k') | webrtc/sdk/android/api/org/webrtc/PeerConnection.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698