Revert "Turn on IPv6 for WebRTC as default as required before ramping the experiment to 30%."

This reverts commit 86c33e3a94f51f8e4b4f305708ec327786ad3794.

TBR=guoweis@webrtc.org

BUG=

Review URL: https://webrtc-codereview.appspot.com/47409004

Cr-Commit-Position: refs/heads/master@{#8608}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8608 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
guoweis@webrtc.org 2015-03-05 04:03:10 +00:00
parent 86c33e3a94
commit d43b2c098d
5 changed files with 8 additions and 23 deletions

View File

@ -341,18 +341,17 @@ bool PeerConnection::Initialize(
int portallocator_flags = port_allocator_->flags();
portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_BUNDLE |
cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET |
cricket::PORTALLOCATOR_ENABLE_IPV6;
cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET;
bool value;
// If IPv6 flag was specified, we'll not override it by experiment.
if (FindConstraint(
constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) {
if (!value) {
portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
if (value) {
portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_IPV6;
}
} else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") ==
"Disabled") {
portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
"Enabled") {
portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_IPV6;
}
port_allocator_->set_flags(portallocator_flags);

View File

@ -432,12 +432,6 @@ bool IPIs6To4(const IPAddress& ip) {
return IPIsHelper(ip, k6To4Prefix, 16);
}
bool IPIsLinkLocal(const IPAddress& ip) {
// Can't use the helper because the prefix is 10 bits.
in6_addr addr = ip.ipv6_address();
return addr.s6_addr[0] == 0xFE && (addr.s6_addr[1] & 0x80) == 0x80;
}
bool IPIsSiteLocal(const IPAddress& ip) {
// Can't use the helper because the prefix is 10 bits.
in6_addr addr = ip.ipv6_address();

View File

@ -162,7 +162,6 @@ size_t HashIP(const IPAddress& ip);
// These are only really applicable for IPv6 addresses.
bool IPIs6Bone(const IPAddress& ip);
bool IPIs6To4(const IPAddress& ip);
bool IPIsLinkLocal(const IPAddress& ip);
bool IPIsSiteLocal(const IPAddress& ip);
bool IPIsTeredo(const IPAddress& ip);
bool IPIsULA(const IPAddress& ip);

View File

@ -601,13 +601,6 @@ bool BasicNetworkManager::IsIgnoredNetwork(const Network& network) const {
if (network.prefix().family() == AF_INET) {
return (network.prefix().v4AddressAsHostOrderInteger() < 0x01000000);
}
// Linklocal addresses require scope id to be bound successfully. However, our
// IPAddress structure doesn't carry that so the information is lost and
// causes binding failure.
if (IPIsLinkLocal(network.GetBestIP())) {
return true;
}
return false;
}

View File

@ -285,13 +285,13 @@ TEST_F(NetworkTest, TestBasicMergeNetworkList) {
void SetupNetworks(NetworkManager::NetworkList* list) {
IPAddress ip;
IPAddress prefix;
EXPECT_TRUE(IPFromString("abcd::1234:5678:abcd:ef12", &ip));
EXPECT_TRUE(IPFromString("abcd::", &prefix));
EXPECT_TRUE(IPFromString("fe80::1234:5678:abcd:ef12", &ip));
EXPECT_TRUE(IPFromString("fe80::", &prefix));
// First, fake link-locals.
Network ipv6_eth0_linklocalnetwork("test_eth0", "Test NetworkAdapter 1",
prefix, 64);
ipv6_eth0_linklocalnetwork.AddIP(ip);
EXPECT_TRUE(IPFromString("abcd::5678:abcd:ef12:3456", &ip));
EXPECT_TRUE(IPFromString("fe80::5678:abcd:ef12:3456", &ip));
Network ipv6_eth1_linklocalnetwork("test_eth1", "Test NetworkAdapter 2",
prefix, 64);
ipv6_eth1_linklocalnetwork.AddIP(ip);