diff options
author | Paul Stewart <pstew@chromium.org> | 2012-09-17 12:24:34 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-09-21 16:07:59 -0700 |
commit | 4d5efb7d5d130e3e6e52ab732127a273bcb95261 (patch) | |
tree | d9ea18db9469fd6d5afd4b14e42a8e86ef42ef2e /resolver.h | |
parent | f28fe198b496b935268f50e2f2d8069fc76a51d7 (diff) | |
download | shill-4d5efb7d5d130e3e6e52ab732127a273bcb95261.tar.gz |
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>
Diffstat (limited to 'resolver.h')
-rw-r--r-- | resolver.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -25,6 +25,14 @@ class Resolver { kShortTimeout }; + // The default comma-separated list of search-list prefixes that + // should be ignored when writing out a DNS configuration. These + // are usually preconfigured by a DHCP server and are not of real + // value to the user. This will release DNS bandwidth for searches + // we expect will have a better chance of getting what the user is + // looking for. + static const char kDefaultIgnoredSearchList[]; + // The default comma-separated list of technologies for which short // DNS timeouts should be enabled. static const char kDefaultShortTimeoutTechnologies[]; @@ -46,6 +54,13 @@ class Resolver { // Remove any created domain name service file. virtual bool ClearDNS(); + // Sets the list of ignored DNS search suffixes. This list will be used + // to filter the domain_search parameter of later SetDNSFromLists() calls. + virtual void set_ignored_search_list( + const std::vector<std::string> &ignored_list) { + ignored_search_list_ = ignored_list; + } + protected: Resolver(); @@ -57,6 +72,7 @@ class Resolver { static const char kShortTimeoutOptions[]; FilePath path_; + std::vector<std::string> ignored_search_list_; DISALLOW_COPY_AND_ASSIGN(Resolver); }; |