History log of /system/connectivity/shill/resolver.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3a62e235646ec19bee71e8dbee5208282dcd13b5 20-Jan-2016 Alex Vakulenko <avakulenko@google.com> shill: Update libchrome APIs to r369476

The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.

Change-Id: Ib4c4b5438a2e249777c9c1b6509f085ad5d00049
/system/connectivity/shill/resolver.cc
c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5 03-Sep-2015 Peter Qiu <zqiu@google.com> License shill to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi, the NOTICE was added with a copy
of the Apache2 license and MODULE_LICENSE_* file was added.

BUG=23587594
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: If41ede586c2465f5831fb7fee270ff41dbfdb596
/system/connectivity/shill/resolver.cc
1a212a6b98b22ad1d69652bb26a9e94138635476 16-Jun-2015 Paul Stewart <pstew@chromium.org> shill: Top-level files n-v: Switch pointer/ref spacing

Switch to Chrome style spacing.

BUG=chromium:501026
TEST=Unit tests

Change-Id: I8bd6f66ea185ca3a2687986f6f2fd99be957dffe
Reviewed-on: https://chromium-review.googlesource.com/278070
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
c9c31d8497c3f053c2160408cc386010fc125fad 22-Oct-2014 Rebecca Silberstein <silberst@chromium.org> shill: add object id to scoped log messages

Add object identifier (DBus::Path) string to scoped logging messages. If
the logging message is called from a static method, SLOG will be called
with nullptr and the log will use (anon) for the object id. Objects
without identifying information will use the (class_name) as their logged
identifier.

BUG=chromium:403996
TEST=ran unit tests and manually inspected net.log

Change-Id: Idf23911a303f5edc4b82917bf1e2cea3f8e44e60
Reviewed-on: https://chromium-review.googlesource.com/224812
Tested-by: Rebecca Silberstein <silberst@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Rebecca Silberstein <silberst@chromium.org>
/system/connectivity/shill/resolver.cc
11c213f3cf64f27a0e42ee6da95e98bd1d4b3202 05-Sep-2014 Ben Chan <benchan@chromium.org> Update code to include base/files/file_util.h

file_util.h was moved from base to base/files
(https://codereview.chromium.org/468253002). This CL updates platform2
code to include base/files/file_util.h instead of base/file_util.h.

BUG=chromium:411001
TEST=Trybot run on paladin, release, and chromiumos-sdk builders.

Change-Id: I488925b54615e131e508a460dc1a27f88168f936
Reviewed-on: https://chromium-review.googlesource.com/216851
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/resolver.cc
6fbf64f493a9aae7d743888039c61a57386203db 22-May-2014 Ben Chan <benchan@chromium.org> shill: Update to build against libchrome-271506.

BUG=chromium:375032
TEST=`USE='cellular gdmwimax wimax vpn' FEATURES=test emerge-$BOARD platform2`

Change-Id: Ib7c8b2b290caa261cbb61d30cf8a361a1e3345e1
Reviewed-on: https://chromium-review.googlesource.com/201211
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
a0ddf46e466bd4ba3d20952f0a6988c680c1af14 06-Feb-2014 Ben Chan <benchan@chromium.org> shill: Update to build against libchrome-242728.

BUG=chromium:341521
CQ-DEPEND=CL:193660
TEST=Tested the following:
1. `FEATURES=test USE='cellular wimax' emerge-$BOARD platform2`
2. Run the following tests:
- network_3GSmokeTest
- network_VPNConnect.*
- network_WiMaxSmoke
- wifi_matfunc

Change-Id: Ic1553c182ab7a833a68c45f012f646b8930cb095
Reviewed-on: https://chromium-review.googlesource.com/193606
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/resolver.cc
f01ddd48950b26c1882caa50245df31c3b13067e 01-Feb-2013 mukesh agrawal <quiche@chromium.org> shill: increase DNS attempts parameter from 2 to 5

The resolver in glibc defaults to a timeout of 5 seconds,
and two tries. Since we're using a shorter timeout (1 second),
increase the number of tries. That will allow us the same
amount of total time (as the default configuration) before
giving up.

BUG=chromium:177558
TEST=unit tests

Change-Id: I17bfc6a073adc2ea22ea96a9d263aa32a57e5300
Reviewed-on: https://gerrit.chromium.org/gerrit/46945
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/resolver.cc
23ac6b72d44c446bca88175883ba26b39c5ed817 01-Feb-2013 mukesh agrawal <quiche@chromium.org> shill: Revert "shill: resolver: Use (even) smaller DNS timeout"

The short DNS timeout was intended to work around an issue with
some DNS servers. The belief was that the DNS failure was
transient, and that a quick retry would improve DNS lookup times.

Field results didn't show any improvement, so back out this change.

Note further that, as of M25 stable, Chrome uses its own DNS
resolver. That resolver has a fixed one second timeout for the
first try, and exponential backoff thereafter.

Consequently, if this code remained in the tree, this code would
only affect system processes.

BUG=chromium:220150
TEST=unit tests

This reverts commit bf667617d573e3af4b808ed317b1d6ca04747ee4.

Conflicts:

connection.cc
connection_unittest.cc
default_profile_unittest.cc
manager.cc
manager.h
mock_resolver.h
resolver.cc
resolver.h
resolver_unittest.cc

Change-Id: Ic96c6c014a973de441ab1771539a0d9f3d5c5967
Reviewed-on: https://gerrit.chromium.org/gerrit/46944
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/resolver.cc
4d5efb7d5d130e3e6e52ab732127a273bcb95261 17-Sep-2012 Paul Stewart <pstew@chromium.org> shill: Ignore certan DNS search paths

Add a manager property to provide a list of DNS Search paths
that should be ignored when applying DHCP parameters. This
covers a list of DNS search suffixes that are popularly
provided, but are generally unlikely to provide any useful
results, therefore significantly reducing DNS lookup performance.

BUG=chromium-os:34495
TEST=Unit-tests + Manual: Add a domain to the default search list and make sure it is filtered from the "search" line in resolv.conf.
CQ-DEPENDS: I54bdd33a05bb704d8c3ff05f71e034fe42635e89

Change-Id: Id92b39f1ad0ae64b3ff50c7671cdf388d92a07af
Reviewed-on: https://gerrit.chromium.org/gerrit/33460
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
6f65c0b387f6dde8113f52745b758ca1c4f349be 11-Sep-2012 Paul Stewart <pstew@chromium.org> shill: Connection: Don't call Resolver::SetDNSFromIPConfig

Don't ever call this function (in fact, remove this from the
resolver), and refactor the code that correctly generates the
DNS search list so that it is usable both from
Connection::UpdateFromIPConfig() and from void
Connection::SetIsDefault().

BUG=chromium-os:34260
TEST=Rerun unit tests + Manual: Connect to AP that supplies only
"DomainName", and ensure that /etc/resolv.conf contains this domain
in the search field both initially and after DHCP renewal.

Change-Id: I9a0705cb54e6588915533cc343b05efcdee71293
Reviewed-on: https://gerrit.chromium.org/gerrit/32996
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
b691efd71561246065eae3cdd73a96ca1b8a528d 09-Aug-2012 Christopher Wiley <wiley@chromium.org> shill: Rename SMLOG to SLOG

Rewrite SMLOG as SLOG, thus saving many edits. Change the location of
the SLOG macro to be memory_log.h, requiring includes to be rewritten
and reordered. While we're rewriting includes, moving all assorted
logging includes into a generic shill/logging.h, thus saving future
logging changes from altering these includes ever again.

BUG=chromium-os:31145
TEST=Builds, unit tests still pass

Change-Id: Ie5129fcbdda87f3149460209a682c698b876b09a
Reviewed-on: https://gerrit.chromium.org/gerrit/29650
Commit-Ready: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
/system/connectivity/shill/resolver.cc
bf667617d573e3af4b808ed317b1d6ca04747ee4 29-Jun-2012 Paul Stewart <pstew@chromium.org> shill: resolver: Use (even) smaller DNS timeout

Use the new glibc facility for sub-second timeouts, and choose
300 milliseconds for the timeout. However, only do this by
default for Ethernet and WiFi networks, since VPN networks
in particular have trouble with this configuration (due to many
name servers and search domains, as well as the additional
latency inherent to such networks). Also, increase the number
of attempts, so we still spend a reasonable amount of time
overall waiting for a DNS response.

Provide a means to change which technologies are setup in this
manner.

BUG=chromium-os:29124
TEST=Manual: Install connection manager, verify via strace that
gethostbyname now waits 300 ms, and retries 15 times per trial (*).
Ensure Chromium continues to work correctly under light loads.
Also, connect via Verizon and VPN and ensure DNS parameters
are back to the long timeout.
List manager properties and ensure it says "ethernet,wifi" for
ShortDNSTimeoutTechnologies and that this is saved out to the
profile.
New unit tests.
CQ-DEPENDS=Ib9ffc59bbfcd5bf3f57d146965c5a43a936348f8

*: Each trial consists of a nameserver / IP address pair, so
for example, if we have IPv6 connectivity and have two "server"
entries in resolv.conf, we first do 30 tries of IPv6 requests,
alternating between the two servers, then another 30 alternating
IPv4 requests between them. This was tested by intentionally
making the DNS server unreachable and instrumenting the gethostbyname
request via strace.

Change-Id: Idd331b4a9fcf96d457ab9959537aefcb86328e12
Reviewed-on: https://gerrit.chromium.org/gerrit/26493
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
bbdef5fc35b48d9b43ba0dc005384abd36b72213 23-Apr-2012 Ben Chan <benchan@chromium.org> shill: Ignore missing-field-initializers warning on LAZY_INSTANCE_INITIALIZER.

When compiling with -Wextra, GCC gives a missing-field-initializers
warning (which is promoted to an error by -Werror) on the
LAZY_INSTANCE_INITIALIZER macro defined in base/lazy_instance.h.

This CL adds -Wno-missing-field-initializers to CXXFLAGS in Makefile to
ignore the warning on LAZY_INSTANCE_INITIALIZER.

BUG=chromium-os:29866
TEST=Build and run unit tests.

Change-Id: I8533f3b89780d1ec2b2c7222be3f5e26aa0e3b83
Reviewed-on: https://gerrit.chromium.org/gerrit/20888
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/resolver.cc
fad4a0b7e55dd82d3815ee96862b6e546727eb6e 19-Apr-2012 Ben Chan <benchan@chromium.org> shill: Replace VLOG with SLOG.

This CL replaces all uses of VLOG(level) with SLOG(scope, level) with
the same verbose level and an appropriate scope for each affected
logging statement.

BUG=chromium-os:29641
TEST=Build and run unit tests. Test scope logging with ff_debug.

Change-Id: Ifdcf1faa2a309bcbd9ee369a66179ce9c7f1ad19
Reviewed-on: https://gerrit.chromium.org/gerrit/20629
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/resolver.cc
abc41aab4fdd3e946ed50a62492d2a6ad73ddaf3 07-Apr-2012 Paul Stewart <pstew@chromium.org> shill: Set DNS timeout to minimum

The resolver library has a timeout parameter set in seconds. Reduce
the timeout from the default of 5 seconds to 1 second.

BUG=chromium-os:29124
TEST=Unit tests; Manual -- strace a ping to a host while manually modifying
resolv.conf to point to a black hole.

Change-Id: Ie1e909b21ed0029e318591dd30db5399311f4f1f
Reviewed-on: https://gerrit.chromium.org/gerrit/19802
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
3e20a2341d0aeb7681e4ee0f89eae6817ade2b3b 16-Feb-2012 Eric Shienbrood <ers@chromium.org> shill: Convert code to use the newest version of libchrome.

The biggest change is a switch from using the deprecated
Task and CallbackN mechanisms to using the new Callback
mechanism.

Note: Original CL was https://gerrit.chromium.org/gerrit/16156.
This is logically another patch to that CL, but since the
latter was already merged, and is considered closed by
Gerrit, it's necessary to create a new CL.

BUG=chromium-os:15330
TEST=Build shill and run it on a zgb with a modem. Build and
run unit tests.
CQ-DEPEND=I37628863370323d30cac493764ea28f8ffd42637

Change-Id: I3ae78a3aa44ec167b79f2170d07650ece888254f
Reviewed-on: https://gerrit.chromium.org/gerrit/18030
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Eric Shienbrood <ers@chromium.org>
/system/connectivity/shill/resolver.cc
b5c8940ae68f85c8c822936f41f4993c51624dcf 13-Mar-2012 Eric Shienbrood <ers@chromium.org> Revert "shill: Convert code to use the newest version of libchrome."

This reverts commit ffebe0c489e0ecccf497547d7078c30cbc8072e2

Unit tests ran on local machine, but wouldn't run on CQ because of some kind of environment difference.

Change-Id: Ia876c0c17f4cd84bca5e2f1bacd7e24a81832d4d
Reviewed-on: https://gerrit.chromium.org/gerrit/17969
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
/system/connectivity/shill/resolver.cc
08a4ffb4ecf5893eb55c523d528bf3e52c66facf 16-Feb-2012 Eric Shienbrood <ers@chromium.org> shill: Convert code to use the newest version of libchrome.

The biggest change is a switch from using the deprecated
Task and CallbackN mechanisms to using the new Callback
mechanism.

This cannot be submitted until vapier submits his CL that
slot-enables the libchrome build
(https://gerrit.chromium.org/gerrit/15415).

BUG=chromium-os:15330
TEST=Build shill and run it on a zgb with a modem. Build and
run unit tests.
CQ-DEPEND=Ic24bb16aac3e1d130a784f34e848e308719a43be

Change-Id: I081a7aa66bee391b867a43e08db2eacdff760945
Reviewed-on: https://gerrit.chromium.org/gerrit/16156
Tested-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Eric Shienbrood <ers@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
/system/connectivity/shill/resolver.cc
3bd0faa1bb82cec28874926a96165c2dab78a543 16-Feb-2012 Thieu Le <thieule@chromium.org> shill: Work around DNS timeouts due to faulty firewalls on IPv4+v6 connections

BUG=chromium-os:24002
TEST=Unit tests, manually loaded shill onto Alex, verify resolf.conf
contains the correct info, browsed web to ensure fast DNS response

Change-Id: I2bf1abb3eb2ae2f2949c28bacce736417ba5df3f
Reviewed-on: https://gerrit.chromium.org/gerrit/15977
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
Commit-Ready: Thieu Le <thieule@chromium.org>
/system/connectivity/shill/resolver.cc
e613202d36e3bfb06a40eea1888694413210ef7e 16-Aug-2011 Paul Stewart <pstew@chromium.org> shill: Add connection to device

Also in the process, do a few bits like setting up a run path in
the manager so it can initialize the resolver output path.

BUG=chromium-os:19095
TEST=Ran unit tests (for regression), tested that DNS and routes applied
for Ethernet on real system.

Change-Id: If505200643efa6c3152f6e61db3b91a04e739c18
Reviewed-on: http://gerrit.chromium.org/gerrit/6087
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
dd60e4549cc8898f7f517283eacc58f67570bd1f 08-Aug-2011 Paul Stewart <pstew@chromium.org> shill: Add connection class

The connection class represents the snapshot of connectivity
state, including routing, address information and addressing.
It is able to apply itself as the "default" connection, by
setting routing table metrics and DNS resolver files.

BUG=chromium-os:19095
TEST=New unittest

Change-Id: I7021867ed8a8559db0e84f58a72692abaf105cad
Reviewed-on: http://gerrit.chromium.org/gerrit/5938
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
0d2ada3971075e78fb9900d0753c9ad94c15add4 10-Aug-2011 Paul Stewart <pstew@chromium.org> Move away from Singleton

Move from Singleton to LazyInstance for one-of classes in Shill.
This will allow them to be subclassed (mocked).

BUG=chromium-os:18986
TEST=Re-run unit tests

Change-Id: I83320694db5df1a263332315ad4f6955b107280b
Reviewed-on: http://gerrit.chromium.org/gerrit/5676
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc
b6063942a712bc2825e78dc026a24a5d7b6131fc 05-Aug-2011 Paul Stewart <pstew@chromium.org> shill: Add singleton to output resolver files

Output a file that can be linked to "resolv.conf" from the contents
of an ipconfig file.

BUG=chromium-os:17278
TEST=New unittest

Change-Id: Ic537dda6f1cb337d631bc75a3aaa835312ce8c01
Reviewed-on: http://gerrit.chromium.org/gerrit/5399
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/resolver.cc