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

Issue 3231005: Fix remaining localhost resolution issues. (Closed)

Created:
10 years, 3 months ago by vandebo (ex-Chrome)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Fix remaining localhost resolution issues. If host resolution is restricted to a single address family and the results of a resolution are all localhost of that type, try again without the address family restriction. Also make --disable-ipv6 apply to resolution of ip literals. BUG=42058, 49024, 32522 TEST=Manual testing in various network configurations. See https://spreadsheets.google.com/ccc?key=0AhSnKEusL6UgdFZIRmxTUnYtZDhjX3lKclBqMHo4YUE&hl=en&authkey=CLKDxMYB Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=58534

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address comments and disable v6 literals for --disable-ipv6 #

Patch Set 3 : Fix mock resolver to ignore network config-induced host resolver flags when using default flags. #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -33 lines) Patch
M net/base/address_family.h View 1 chunk +2 lines, -0 lines 2 comments Download
M net/base/host_resolver_impl.cc View 2 chunks +29 lines, -17 lines 1 comment Download
M net/base/host_resolver_proc.cc View 1 2 chunks +58 lines, -1 line 6 comments Download
M net/base/mock_host_resolver.cc View 3 chunks +22 lines, -15 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
vandebo (ex-Chrome)
I tested the matrix in the spreadsheet on Linux and Mac and this resolves all ...
10 years, 3 months ago (2010-08-27 18:14:38 UTC) #1
eroman
Is this only for resolving "localhost" ? It seems like the problem is the automatic ...
10 years, 3 months ago (2010-08-27 19:03:14 UTC) #2
vandebo (ex-Chrome)
Arg, codereview lost the first reply. On 2010/08/27 19:03:14, eroman wrote: > Is this only ...
10 years, 3 months ago (2010-08-27 21:40:37 UTC) #3
eroman
My main interest is that if a caller to HostResolver::Resolve() passes in a RequestInfo that ...
10 years, 3 months ago (2010-08-27 23:02:11 UTC) #4
vandebo (ex-Chrome)
> My main interest is that if a caller to HostResolver::Resolve() passes in a > ...
10 years, 3 months ago (2010-09-02 21:40:57 UTC) #5
vandebo (ex-Chrome)
Will, do you feel comfortable reviewing this change while Eric is out? I'd like to ...
10 years, 3 months ago (2010-09-02 21:42:04 UTC) #6
willchan no longer on Chromium
Some preliminary comments. Lunch and then I'll be back to finish. http://codereview.chromium.org/3231005/diff/12001/13002 File net/base/host_resolver_impl.cc (right): ...
10 years, 3 months ago (2010-09-03 19:36:50 UTC) #7
vandebo (ex-Chrome)
http://codereview.chromium.org/3231005/diff/12001/13003 File net/base/host_resolver_proc.cc (right): http://codereview.chromium.org/3231005/diff/12001/13003#newcode215 net/base/host_resolver_proc.cc:215: err == 0 && IsAllLocalhostOfOneFamily(ai)) { On 2010/09/03 19:36:50, ...
10 years, 3 months ago (2010-09-03 19:42:18 UTC) #8
willchan no longer on Chromium
I agree with your statement that you've addressed eroman's concern earlier. I feel like the ...
10 years, 3 months ago (2010-09-03 20:23:07 UTC) #9
vandebo (ex-Chrome)
10 years, 3 months ago (2010-09-03 20:33:42 UTC) #10
http://codereview.chromium.org/3231005/diff/12001/13001
File net/base/address_family.h (right):

http://codereview.chromium.org/3231005/diff/12001/13001#newcode26
net/base/address_family.h:26: HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6 =
1 << 2,
On 2010/09/03 20:23:07, willchan wrote:
> Is this flag an abuse of HostResolverFlags?  It doesn't jive with the comment
> above which says this only controls addrinfo.ai_flags.  Or perhaps we need to
> update the comment?

The flags do determine addrinfo.ai_flags, though there's not a direct
correspondence. It is somewhat of an abuse, yes.  I updated the comment to
describe reality a bit better.

Powered by Google App Engine
This is Rietveld 408576698