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

Issue 3036011: [Linux] Enable connecting to localhost when offline. (Closed)

Created:
10 years, 5 months ago by vandebo (ex-Chrome)
Modified:
9 years, 7 months ago
Reviewers:
cbentzel, eroman, wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

[Linux] Enable connecting to localhost when offline. Add a utility function to determine if only loopback address are configured. Add a mechanism to add supplemental HostResolverFlags in the HostResolver. Change the resolver on Linux to not use AI_ADDRCONFIG if only loopback addresses are configured. BUG=41408 TEST=localhost works when offline Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=53487

Patch Set 1 #

Patch Set 2 : Oops - init new member variable #

Total comments: 8

Patch Set 3 : Address comments #

Patch Set 4 : Address comment. #

Total comments: 7

Patch Set 5 : Address comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -5 lines) Patch
M net/base/address_family.h View 1 2 3 1 chunk +5 lines, -3 lines 1 comment Download
M net/base/host_cache_unittest.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M net/base/host_resolver_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/base/host_resolver_impl.cc View 1 2 4 chunks +14 lines, -2 lines 2 comments Download
M net/base/host_resolver_proc.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M net/base/net_util.h View 1 chunk +4 lines, -0 lines 0 comments Download
M net/base/net_util.cc View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
vandebo (ex-Chrome)
10 years, 5 months ago (2010-07-22 18:26:54 UTC) #1
eroman
@wtc: I wander if we should just remove AI_ADDRCONFIG on linux the same as we ...
10 years, 5 months ago (2010-07-22 21:26:03 UTC) #2
vandebo (ex-Chrome)
On 2010/07/22 21:26:03, eroman wrote: > @wtc: I wander if we should just remove AI_ADDRCONFIG ...
10 years, 5 months ago (2010-07-22 21:43:51 UTC) #3
eroman
http://codereview.chromium.org/3036011/diff/3001/4001 File net/base/address_family.h (right): http://codereview.chromium.org/3036011/diff/3001/4001#newcode25 net/base/address_family.h:25: HOST_RESOLVER_LOOPBACK_ONLY = 1 << 15, On 2010/07/22 21:43:51, vandebo ...
10 years, 5 months ago (2010-07-22 22:17:11 UTC) #4
vandebo (ex-Chrome)
http://codereview.chromium.org/3036011/diff/3001/4001 File net/base/address_family.h (right): http://codereview.chromium.org/3036011/diff/3001/4001#newcode25 net/base/address_family.h:25: HOST_RESOLVER_LOOPBACK_ONLY = 1 << 15, On 2010/07/22 22:17:11, eroman ...
10 years, 5 months ago (2010-07-22 22:25:31 UTC) #5
cbentzel
I don't think this is a problem, but the additional HostResolverFlags bit means that there ...
10 years, 5 months ago (2010-07-22 22:51:54 UTC) #6
cbentzel
On 2010/07/22 22:51:54, cbentzel wrote: > I don't think this is a problem, but the ...
10 years, 5 months ago (2010-07-22 22:53:00 UTC) #7
vandebo (ex-Chrome)
On 2010/07/22 22:53:00, cbentzel wrote: > On 2010/07/22 22:51:54, cbentzel wrote: > > I don't ...
10 years, 5 months ago (2010-07-22 23:55:01 UTC) #8
wtc
eroman: Ulrich Drepper (a main author of glibc) advised that we use AI_ADDRCONFIG on Linux. ...
10 years, 5 months ago (2010-07-22 23:56:22 UTC) #9
vandebo (ex-Chrome)
On 2010/07/22 23:56:22, wtc wrote: > eroman: Ulrich Drepper (a main author of glibc) advised ...
10 years, 5 months ago (2010-07-23 00:10:04 UTC) #10
wtc
On 2010/07/23 00:10:04, vandebo wrote: > > According to your comment in SystemHostResolverProc, Windows actually ...
10 years, 5 months ago (2010-07-23 00:30:13 UTC) #11
eroman
lgtm http://codereview.chromium.org/3036011/diff/21001/22003 File net/base/host_resolver_impl.cc (right): http://codereview.chromium.org/3036011/diff/21001/22003#newcode730 net/base/host_resolver_impl.cc:730: if (HaveOnlyLoopbackAddresses()) FYI: be aware this might cause ...
10 years, 5 months ago (2010-07-23 00:47:49 UTC) #12
eroman
http://codereview.chromium.org/3036011/diff/21001/22001 File net/base/address_family.h (right): http://codereview.chromium.org/3036011/diff/21001/22001#newcode22 net/base/address_family.h:22: // Hint to the resolve proc that only loopback ...
10 years, 5 months ago (2010-07-23 00:48:14 UTC) #13
eroman
http://codereview.chromium.org/3036011/diff/21001/22003 File net/base/host_resolver_impl.cc (right): http://codereview.chromium.org/3036011/diff/21001/22003#newcode1062 net/base/host_resolver_impl.cc:1062: #if defined(OS_LINUX) Should we enable this on mac as ...
10 years, 5 months ago (2010-07-23 00:57:50 UTC) #14
vandebo (ex-Chrome)
10 years, 5 months ago (2010-07-23 01:03:30 UTC) #15
On 2010/07/23 00:47:49, eroman wrote:
> http://codereview.chromium.org/3036011/diff/21001/22003#newcode730
> net/base/host_resolver_impl.cc:730: if (HaveOnlyLoopbackAddresses())
> FYI: be aware this might cause a startup test regression. When jar landed
> something similar for IPv6 probing it caused such a regression, and he ended
up
> having to post an async task for it instead.

There are a couple of other parts to the IPv6 probe; I suspect this isn't the
slow part. But, I will certainly keep an eye on it.

On 2010/07/23 00:57:50, eroman wrote:
> http://codereview.chromium.org/3036011/diff/21001/22003#newcode1062
> net/base/host_resolver_impl.cc:1062: #if defined(OS_LINUX)
> Should we enable this on mac as well?

I tested this on Mac, and it seemed to work already.  If we find it actually is
a problem, it should be easy to change.

Powered by Google App Engine
This is Rietveld 408576698