TS-3238: remove _res symbol dependency The global _res symbol from libresolv was ostensibly being used to get resolver options, but in fact those options were never used. We can remove our reference to it.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/34d22008 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/34d22008 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/34d22008 Branch: refs/heads/master Commit: 34d2200862ea893aefcaf7ecb621a6fa26b4c0a3 Parents: a8d1862 Author: James Peach <[email protected]> Authored: Mon Oct 27 17:21:15 2014 -0700 Committer: James Peach <[email protected]> Committed: Mon Dec 15 16:43:03 2014 -0800 ---------------------------------------------------------------------- CHANGES | 4 +++- iocore/dns/DNS.cc | 3 +-- iocore/dns/I_DNSProcessor.h | 2 +- iocore/dns/P_DNSProcessor.h | 3 +-- iocore/dns/SplitDNS.cc | 1 - 5 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/34d22008/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 5f0f372..318e9fd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.3.0 + *) [TS-3238] Stop referencing the global _res symbol. + *) [TS-3237] Change HostDB to not segregate DNS results by port. - *) [TS-3226]: Move access of read vio inside the mutex to prevent ntodo corruption + *) [TS-3226] Move access of read vio inside the mutex to prevent ntodo corruption. *) [TS-3224] fix ts_lua core dump issue. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/34d22008/iocore/dns/DNS.cc ---------------------------------------------------------------------- diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc index 874d4d1..f6cc2c7 100644 --- a/iocore/dns/DNS.cc +++ b/iocore/dns/DNS.cc @@ -207,11 +207,10 @@ DNSProcessor::start(int, size_t stacksize) { } void -DNSProcessor::open(sockaddr const* target, int aoptions) +DNSProcessor::open(sockaddr const* target) { DNSHandler *h = new DNSHandler; - h->options = aoptions; h->mutex = thread->mutex; h->m_res = &l_res; ats_ip_copy(&h->local_ipv4.sa, &local_ipv4.sa); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/34d22008/iocore/dns/I_DNSProcessor.h ---------------------------------------------------------------------- diff --git a/iocore/dns/I_DNSProcessor.h b/iocore/dns/I_DNSProcessor.h index adb8b59..31c21ea 100644 --- a/iocore/dns/I_DNSProcessor.h +++ b/iocore/dns/I_DNSProcessor.h @@ -122,7 +122,7 @@ struct DNSProcessor: public Processor // Open/close a link to a 'named' (done in start()) // - void open(sockaddr const* ns = 0, int options = _res.options); + void open(sockaddr const* ns = 0); DNSProcessor(); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/34d22008/iocore/dns/P_DNSProcessor.h ---------------------------------------------------------------------- diff --git a/iocore/dns/P_DNSProcessor.h b/iocore/dns/P_DNSProcessor.h index 4183341..ccfa31a 100644 --- a/iocore/dns/P_DNSProcessor.h +++ b/iocore/dns/P_DNSProcessor.h @@ -209,7 +209,6 @@ struct DNSHandler: public Continuation int ifd[MAX_NAMED]; int n_con; DNSConnection con[MAX_NAMED]; - int options; Queue<DNSEntry> entries; Queue<DNSConnection> triggered; int in_flight; @@ -322,7 +321,7 @@ struct DNSServer TS_INLINE DNSHandler::DNSHandler() - : Continuation(NULL), n_con(0), options(0), in_flight(0), name_server(0), in_write_dns(0), + : Continuation(NULL), n_con(0), in_flight(0), name_server(0), in_write_dns(0), hostent_cache(0), last_primary_retry(0), last_primary_reopen(0), m_res(0), txn_lookup_timeout(0), generator((uint32_t)((uintptr_t)time(NULL) ^ (uintptr_t)this)) { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/34d22008/iocore/dns/SplitDNS.cc ---------------------------------------------------------------------- diff --git a/iocore/dns/SplitDNS.cc b/iocore/dns/SplitDNS.cc index f0f0a98..e632880 100644 --- a/iocore/dns/SplitDNS.cc +++ b/iocore/dns/SplitDNS.cc @@ -526,7 +526,6 @@ SplitDNSRecord::Init(matcher_line * line_info) dnsH->m_res = res; dnsH->mutex = SplitDNSConfig::dnsHandler_mutex; - dnsH->options = res->options; ats_ip_invalidate(&dnsH->ip.sa); // Mark to use default DNS. m_servers.x_dnsH = dnsH;
