diff --git a/p2p/base/port_unittest.cc b/p2p/base/port_unittest.cc index a21eee17dc..0bae3ece13 100644 --- a/p2p/base/port_unittest.cc +++ b/p2p/base/port_unittest.cc @@ -1759,7 +1759,7 @@ TEST_F(PortTest, TestUdpSingleAddressV6CrossTypePorts) { TEST_F(PortTest, TestUdpMultipleAddressesV6CrossTypePorts) { webrtc::test::ScopedKeyValueConfig field_trials( - "WebRTC-PreferGlobalIPv6ToLinkLocal/Enabled/"); + "WebRTC-IPv6NetworkResolutionFixes/Enabled/"); FakePacketSocketFactory factory; std::unique_ptr ports[5]; SocketAddress addresses[5] = { diff --git a/rtc_base/network.cc b/rtc_base/network.cc index d35966c8ed..c9d497e8a5 100644 --- a/rtc_base/network.cc +++ b/rtc_base/network.cc @@ -1111,9 +1111,11 @@ IPAddress Network::GetBestIP() const { } InterfaceAddress selected_ip, link_local_ip, ula_ip; + // Bug fix to prefer global IPv6 address over link local. + // Field trial key reserved in bugs.webrtc.org/14334 const bool prefer_global_ipv6_to_link_local = field_trials_ - ? field_trials_->IsEnabled("WebRTC-PreferGlobalIPv6ToLinkLocal") + ? field_trials_->IsEnabled("WebRTC-IPv6NetworkResolutionFixes") : false; for (const InterfaceAddress& ip : ips_) { // Ignore any address which has been deprecated already. diff --git a/rtc_base/network.h b/rtc_base/network.h index f7eec7445f..d82ddeed88 100644 --- a/rtc_base/network.h +++ b/rtc_base/network.h @@ -433,7 +433,7 @@ class RTC_EXPORT Network { // Here is the rule on how we mark the IPv6 address as ignorable for WebRTC. // 1) return all global temporary dynamic and non-deprecated ones. // 2) if #1 not available, return global ones. - // 3) if #2 not available and WebRTC-PreferGlobalIPv6ToLinkLocal enabled, + // 3) if #2 not available and WebRTC-IPv6NetworkResolutionFixes enabled, // return local link ones. // 4) if #3 not available, use ULA ipv6 as last resort. (ULA stands for // unique local address, which is not route-able in open internet but might diff --git a/rtc_base/network_unittest.cc b/rtc_base/network_unittest.cc index a5261545e5..8b2a5cf66a 100644 --- a/rtc_base/network_unittest.cc +++ b/rtc_base/network_unittest.cc @@ -1160,7 +1160,7 @@ TEST_F(NetworkTest, TestIPv6Selection) { // Test that the filtering logic follows the defined ruleset in network.h. TEST_F(NetworkTest, TestGetBestIPWithPreferGlobalIPv6ToLinkLocalEnabled) { webrtc::test::ScopedKeyValueConfig field_trials( - "WebRTC-PreferGlobalIPv6ToLinkLocal/Enabled/"); + "WebRTC-IPv6NetworkResolutionFixes/Enabled/"); InterfaceAddress ip, link_local; std::string ipstr;