12345678910111213141516171819202122232425262728293031323334 |
- # Disables IPv6 probing and adds an option to change the IPv6 probing result
- # TODO: Consider adding a chrome://flag to set the command-line flag
- --- a/net/dns/host_resolver_manager.cc
- +++ b/net/dns/host_resolver_manager.cc
- @@ -29,6 +29,7 @@
- #include "base/bind_helpers.h"
- #include "base/callback.h"
- #include "base/callback_helpers.h"
- +#include "base/command_line.h"
- #include "base/compiler_specific.h"
- #include "base/containers/linked_list.h"
- #include "base/debug/debugger.h"
- @@ -122,11 +123,6 @@ const unsigned kMinimumTTLSeconds = kCac
- // cached.
- const int kIPv6ProbePeriodMs = 1000;
-
- -// RIPE NCC k.root-servers.net. 2001:7fd::1 (anycasted), used for IPv6 probes.
- -const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x07, 0xfd, 0x00, 0x00,
- - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- - 0x00, 0x00, 0x00, 0x01};
- -
- enum DnsResolveStatus {
- RESOLVE_STATUS_DNS_SUCCESS = 0,
- RESOLVE_STATUS_PROC_SUCCESS,
- @@ -3179,7 +3175,7 @@ bool HostResolverManager::IsIPv6Reachabl
- if ((tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
- kIPv6ProbePeriodMs) {
- last_ipv6_probe_result_ =
- - IsGloballyReachable(IPAddress(kIPv6ProbeAddress), net_log);
- + !base::CommandLine::ForCurrentProcess()->HasSwitch("set-ipv6-probe-false");
- last_ipv6_probe_time_ = tick_clock_->NowTicks();
- cached = false;
- }
|