Index: net/dns/host_resolver_impl.cc |
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc |
index 52c6f93bb522289440541ed76bdde9d4087298be..90b7d36a2cf7e44f43ae44f84f053078f68db8a1 100644 |
--- a/net/dns/host_resolver_impl.cc |
+++ b/net/dns/host_resolver_impl.cc |
@@ -1799,6 +1799,7 @@ HostResolverImpl::HostResolverImpl( |
received_dns_config_(false), |
num_dns_failures_(0), |
probe_ipv6_support_(true), |
+ use_local_ipv6_(false), |
resolved_known_ipv6_hostname_(false), |
additional_resolver_flags_(0), |
fallback_to_proctask_(true) { |
@@ -1824,12 +1825,12 @@ HostResolverImpl::HostResolverImpl( |
EnsureDnsReloaderInit(); |
#endif |
- // TODO(szym): Remove when received_dns_config_ is removed, once |
- // http://crbug.com/137914 is resolved. |
{ |
DnsConfig dns_config; |
NetworkChangeNotifier::GetDnsConfig(&dns_config); |
received_dns_config_ = dns_config.IsValid(); |
+ // Conservatively assume local IPv6 is needed when DnsConfig is not valid. |
+ use_local_ipv6_ = !dns_config.IsValid() || dns_config.use_local_ipv6; |
mmenke
2013/09/16 16:34:46
What are the latest numbers on invalid DNS configs
szym
2013/09/16 23:48:18
After ttuttle's fix, HaveDnsConfig hovers at 0.5%.
|
} |
fallback_to_proctask_ = !ConfigureAsyncDnsNoFallbackFieldTrial(); |
@@ -2142,7 +2143,7 @@ HostResolverImpl::Key HostResolverImpl::GetEffectiveKeyForRequest( |
AddressFamily effective_address_family = info.address_family(); |
if (info.address_family() == ADDRESS_FAMILY_UNSPECIFIED) { |
- if (probe_ipv6_support_) { |
+ if (probe_ipv6_support_ && !use_local_ipv6_) { |
mmenke
2013/09/16 16:34:46
Should we be unit testing this, both in the case o
szym
2013/09/16 19:17:35
The probe uses ClientSocketFactory::GetDefaultFact
mmenke
2013/09/16 19:25:18
Ahh, right. I'd only thought about the DNS config
|
base::TimeTicks start_time = base::TimeTicks::Now(); |
// Google DNS address. |
const uint8 kIPv6Address[] = |
@@ -2266,6 +2267,8 @@ void HostResolverImpl::OnDNSChanged() { |
// TODO(szym): Remove once http://crbug.com/137914 is resolved. |
received_dns_config_ = dns_config.IsValid(); |
+ // Conservatively assume local IPv6 is needed when DnsConfig is not valid. |
+ use_local_ipv6_ = !dns_config.IsValid() || dns_config.use_local_ipv6; |
num_dns_failures_ = 0; |