summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-16 21:43:17 +0000
committerttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-16 21:43:17 +0000
commit967d1b53e827f9f4ceb18c0af7d3ff1c9584ec54 (patch)
tree1da4f71ebaa85c8d61e267033c46798f67850f3e /net
parent48e8b40c844963aeded16f8e9c6ca8ecbf1587ee (diff)
downloadchromium_src-967d1b53e827f9f4ceb18c0af7d3ff1c9584ec54.zip
chromium_src-967d1b53e827f9f4ceb18c0af7d3ff1c9584ec54.tar.gz
chromium_src-967d1b53e827f9f4ceb18c0af7d3ff1c9584ec54.tar.bz2
Label IPv6 reachability checks in NetLog
Chrome's internal DNS resolver checks whether the host currently has global IPv6 connectivity by creating a socket connected to Google Public DNS' IPv6 address. These show up in the NetLog as UDP_SOCKET objects with a source dependency of the HOST_RESOLVER_IMPL_REQUEST. This change adds an explicit IPV6_REACHABILITY_CHECK source type that will show up instead, to clarify the purpose of the UDP sockets. (Note that no packets are actually sent as a result of the checks; UDP doesn't need to send any packets to connect, and the HostResolverImpl doesn't send any data over the socket explicitly.) BUG=331746 Review URL: https://codereview.chromium.org/141023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245336 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/net_log_event_type_list.h4
-rw-r--r--net/base/net_log_source_type_list.h1
-rw-r--r--net/dns/host_resolver_impl.cc7
3 files changed, 11 insertions, 1 deletions
diff --git a/net/base/net_log_event_type_list.h b/net/base/net_log_event_type_list.h
index 7ebe01c..cd73abd 100644
--- a/net/base/net_log_event_type_list.h
+++ b/net/base/net_log_event_type_list.h
@@ -2275,3 +2275,7 @@ EVENT_TYPE(SIMPLE_CACHE_ENTRY_CLOSE_BEGIN)
// This event is created when the Simple Cache finishes a CloseEntry call. It
// contains no parameters.
EVENT_TYPE(SIMPLE_CACHE_ENTRY_CLOSE_END)
+
+// This event is created (in a source of the same name) when the internal DNS
+// resolver creates a UDP socket to check for global IPv6 connectivity.
+EVENT_TYPE(IPV6_REACHABILITY_CHECK)
diff --git a/net/base/net_log_source_type_list.h b/net/base/net_log_source_type_list.h
index 2219f7e..5f6b8f0 100644
--- a/net/base/net_log_source_type_list.h
+++ b/net/base/net_log_source_type_list.h
@@ -28,3 +28,4 @@ SOURCE_TYPE(DOWNLOAD)
SOURCE_TYPE(FILESTREAM)
SOURCE_TYPE(DNS_PROBER)
SOURCE_TYPE(PROXY_CLIENT_SOCKET)
+SOURCE_TYPE(IPV6_REACHABILITY_CHECK)
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index f90df04..a1ab0e5 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -2155,7 +2155,12 @@ HostResolverImpl::Key HostResolverImpl::GetEffectiveKeyForRequest(
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88 };
IPAddressNumber address(kIPv6Address,
kIPv6Address + arraysize(kIPv6Address));
- bool rv6 = IsGloballyReachable(address, net_log);
+ BoundNetLog probe_net_log = BoundNetLog::Make(
+ net_log.net_log(), NetLog::SOURCE_IPV6_REACHABILITY_CHECK);
+ probe_net_log.BeginEvent(NetLog::TYPE_IPV6_REACHABILITY_CHECK,
+ net_log.source().ToEventParametersCallback());
+ bool rv6 = IsGloballyReachable(address, probe_net_log);
+ probe_net_log.EndEvent(NetLog::TYPE_IPV6_REACHABILITY_CHECK);
if (rv6)
net_log.AddEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_IPV6_SUPPORTED);