mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Rename PreferGlobalIPv6ToLinkLocal field trial to group IPv6 fixes.
This combines the below IPv6 fixes into the field trial WebRTC-IPv6NetworkResolutionFixes: 1. Prefer global IPv6 address over link local 2. Use address family when resolving STUN hostname WebRTC-PreferGlobalIPv6ToLinkLocal is currently in Dev but will be rolled back temporarily. Bug: webrtc:14334, webrtc:14131 Change-Id: I1fb3f55c4c5f3c5c0b441ece30e72cf393e074d0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271340 Reviewed-by: Diep Bui <diepbp@webrtc.org> Commit-Queue: Sameer Vijaykar <samvi@google.com> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37754}
This commit is contained in:
parent
a75eb43e99
commit
71434ae614
4 changed files with 6 additions and 4 deletions
|
@ -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<Port> ports[5];
|
||||
SocketAddress addresses[5] = {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue