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

Unified Diff: webrtc/pc/peerconnection.cc

Issue 2731813002: Add the option to disable IPv6 ICE candidates on WiFi (Closed)
Patch Set: Created 3 years, 10 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..4a27e07d4f3d55207e4b3309c0accea4e88565d4 100644
--- a/webrtc/pc/peerconnection.cc
+++ b/webrtc/pc/peerconnection.cc
@@ -2505,7 +2505,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 +2516,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 WIFI are disabled.";
Taylor Brandstetter 2017/03/05 23:45:30 nit: WIFI spelling
Zhi Huang 2017/03/06 21:14:19 Done.
+ }
+
if (configuration.tcp_candidate_policy == kTcpCandidatePolicyDisabled) {
portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_TCP;
LOG(LS_INFO) << "TCP candidates are disabled.";

Powered by Google App Engine
This is Rietveld 408576698