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."; |