Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 14208010: [net/dns] Add test DualFamilyLocalhost and fix it when DnsClient enabled. (Closed)

Created:
7 years, 8 months ago by szym
Modified:
7 years, 8 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, mmenke
Visibility:
Public.

Description

[net/dns] Add test DualFamilyLocalhost and fix it when DnsClient enabled. On some platforms, listening on "localhost" binds to the IPv6 loopback (::1), even if there's no global IPv6 connectivity. In such situations, HostResolverImpl restricts lookups to IPv4 (AF_INET) for performance reasons, but then navigating to http://localhost results in "connection refused". HostResolverProc has a workaround for this situation. This CL adds a test for this behavior and replicates the workaround in HostResolverImpl::ServeFromHosts (for the built-in asynchronous DNS). BUG=224215 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194663

Patch Set 1 #

Patch Set 2 : use proper resolver flags #

Patch Set 3 : make net_export_private #

Patch Set 4 : Implement the needed logic in ServeFromHosts #

Total comments: 19

Patch Set 5 : responded to review #

Total comments: 1

Patch Set 6 : test only IPv4 loopback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -8 lines) Patch
M net/dns/host_resolver_impl.cc View 1 2 3 4 5 4 chunks +31 lines, -1 line 0 comments Download
M net/dns/host_resolver_impl_unittest.cc View 1 2 3 4 3 chunks +74 lines, -6 lines 0 comments Download
M net/dns/host_resolver_proc.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
szym
PTAL. Patch Set 3: with test and bug (test fails on ios_dbg_simulator, mac_rel and win_rel) ...
7 years, 8 months ago (2013-04-16 22:52:49 UTC) #1
mmenke
This looks pretty reasonable to me, no major suggestions. https://codereview.chromium.org/14208010/diff/20001/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/14208010/diff/20001/net/dns/host_resolver_impl.cc#newcode253 net/dns/host_resolver_impl.cc:253: ...
7 years, 8 months ago (2013-04-17 15:42:32 UTC) #2
szym
https://codereview.chromium.org/14208010/diff/20001/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/14208010/diff/20001/net/dns/host_resolver_impl.cc#newcode253 net/dns/host_resolver_impl.cc:253: bool IsAllLocalhostOfOneFamily(const AddressList& list) { On 2013/04/17 15:42:32, mmenke ...
7 years, 8 months ago (2013-04-17 17:09:16 UTC) #3
mmenke
LGTM https://codereview.chromium.org/14208010/diff/20001/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/14208010/diff/20001/net/dns/host_resolver_impl.cc#newcode262 net/dns/host_resolver_impl.cc:262: case ADDRESS_FAMILY_IPV6: On 2013/04/17 17:09:16, szym wrote: > ...
7 years, 8 months ago (2013-04-17 17:35:00 UTC) #4
szym
7 years, 8 months ago (2013-04-17 20:07:46 UTC) #5
Message was sent while issue was closed.
Committed patchset #6 manually as r194663.

Powered by Google App Engine
This is Rietveld 408576698