Permalink
Browse files

remove (non-working) [aaaa-]addition-processing flags from the recurs…

…or. Closes #1448
  • Loading branch information...
1 parent dbde080 commit 5cdeede95ce8d807b94cbe5596b8c7ba7ca9c222 @Habbie Habbie committed Jun 3, 2014
Showing with 0 additions and 63 deletions.
  1. +0 −5 pdns/pdns_recursor.cc
  2. +0 −55 pdns/syncres.cc
  3. +0 −3 pdns/syncres.hh
@@ -1823,9 +1823,6 @@ int serviceMain(int argc, char*argv[])
exit(99);
}
- SyncRes::s_doAAAAAdditionalProcessing = ::arg().mustDo("aaaa-additional-processing");
- SyncRes::s_doAdditionalProcessing = ::arg().mustDo("additional-processing") | SyncRes::s_doAAAAAdditionalProcessing;
-
SyncRes::s_noEDNSPing = true; // ::arg().mustDo("disable-edns-ping");
SyncRes::s_noEDNS = ::arg().mustDo("disable-edns");
if(!SyncRes::s_noEDNS) {
@@ -2084,8 +2081,6 @@ int main(int argc, char **argv)
::arg().set("soa-minimum-ttl","Don't change")="0";
::arg().set("soa-serial-offset","Don't change")="0";
::arg().set("no-shuffle","Don't change")="off";
- ::arg().set("additional-processing","turn on to do additional processing")="off";
- ::arg().set("aaaa-additional-processing","turn on to do AAAA additional processing (slow)")="off";
::arg().set("local-port","port to listen on")="53";
::arg().set("local-address","IP addresses to listen on, separated by spaces or commas. Also accepts ports.")="127.0.0.1";
::arg().set("trace","if we should output heaps of logging. set to 'fail' to only log failing domains")="off";
View
@@ -70,8 +70,6 @@ SyncRes::LogMode SyncRes::s_lm;
bool SyncRes::s_noEDNSPing;
bool SyncRes::s_noEDNS;
-bool SyncRes::s_doAdditionalProcessing;
-bool SyncRes::s_doAAAAAdditionalProcessing;
SyncRes::SyncRes(const struct timeval& now) : d_outqueries(0), d_tcpoutqueries(0), d_throttledqueries(0), d_timeouts(0), d_unreachables(0),
d_now(now),
@@ -131,8 +129,6 @@ int SyncRes::beginResolve(const string &qname, const QType &qtype, uint16_t qcla
set<GetBestNSAnswer> beenthere;
int res=doResolve(qname, qtype, ret, 0, beenthere);
- if(!res && s_doAdditionalProcessing)
- addCruft(qname, ret);
return res;
}
@@ -1184,57 +1180,6 @@ int SyncRes::doResolveAt(set<string, CIStringCompare> nameservers, string auth,
return -1;
}
-static bool uniqueComp(const DNSResourceRecord& a, const DNSResourceRecord& b)
-{
- return(a.qtype==b.qtype && a.qname==b.qname && a.content==b.content);
-}
-
-void SyncRes::addCruft(const string &qname, vector<DNSResourceRecord>& ret)
-{
- for(vector<DNSResourceRecord>::const_iterator k=ret.begin();k!=ret.end();++k) // don't add stuff to an NXDOMAIN!
- if(k->d_place==DNSResourceRecord::AUTHORITY && k->qtype==QType(QType::SOA))
- return;
-
- // LOG(qname<<": Adding best authority records from cache"<<endl);
- // addAuthorityRecords(qname,ret,0);
- // LOG(qname<<": Done adding best authority records."<<endl);
-
- LOG(d_prefix<<qname<<": Starting additional processing"<<endl);
- vector<DNSResourceRecord> addit;
-
- for(vector<DNSResourceRecord>::const_iterator k=ret.begin();k!=ret.end();++k)
- if( (k->d_place==DNSResourceRecord::ANSWER && (k->qtype==QType(QType::MX) || k->qtype==QType(QType::SRV))) ||
- ((k->d_place==DNSResourceRecord::AUTHORITY || k->d_place==DNSResourceRecord::ANSWER) && k->qtype==QType(QType::NS))) {
- LOG(d_prefix<<qname<<": record '"<<k->content<<"|"<<k->qtype.getName()<<"' needs IP for additional processing"<<endl);
- set<GetBestNSAnswer> beenthere;
- vector<pair<string::size_type, string::size_type> > fields;
- vstringtok(fields, k->content, " ");
- string host;
- if(k->qtype==QType(QType::MX) && fields.size()==2)
- host=string(k->content.c_str() + fields[1].first, fields[1].second - fields[1].first);
- else if(k->qtype==QType(QType::NS))
- host=k->content;
- else if(k->qtype==QType(QType::SRV) && fields.size()==4)
- host=string(k->content.c_str() + fields[3].first, fields[3].second - fields[3].first);
- else
- continue;
- // we used to do additional processing here.. no more
- // doResolve(host, QType(QType::A), addit, 1, beenthere);
- }
-
- if(!addit.empty()) {
- sort(addit.begin(), addit.end());
- addit.erase(unique(addit.begin(), addit.end(), uniqueComp), addit.end());
- for(vector<DNSResourceRecord>::iterator k=addit.begin();k!=addit.end();++k) {
- if(k->qtype.getCode()==QType::A || k->qtype.getCode()==QType::AAAA) {
- k->d_place=DNSResourceRecord::ADDITIONAL;
- ret.push_back(*k);
- }
- }
- }
- LOG(d_prefix<<qname<<": Done with additional processing"<<endl);
-}
-
void SyncRes::addAuthorityRecords(const string& qname, vector<DNSResourceRecord>& ret, int depth)
{
set<DNSResourceRecord> bestns;
View
@@ -290,8 +290,6 @@ public:
static uint64_t s_nodelegated;
static uint64_t s_unreachables;
static unsigned int s_minimumTTL;
- static bool s_doAAAAAdditionalProcessing;
- static bool s_doAdditionalProcessing;
static bool s_doIPv6;
unsigned int d_outqueries;
unsigned int d_tcpoutqueries;
@@ -438,7 +436,6 @@ private:
bool doCNAMECacheCheck(const string &qname, const QType &qtype, vector<DNSResourceRecord>&ret, int depth, int &res);
bool doCacheCheck(const string &qname, const QType &qtype, vector<DNSResourceRecord>&ret, int depth, int &res);
void getBestNSFromCache(const string &qname, set<DNSResourceRecord>&bestns, bool* flawedNSSet, int depth, set<GetBestNSAnswer>& beenthere);
- void addCruft(const string &qname, vector<DNSResourceRecord>& ret);
string getBestNSNamesFromCache(const string &qname,set<string, CIStringCompare>& nsset, bool* flawedNSSet, int depth, set<GetBestNSAnswer>&beenthere);
void addAuthorityRecords(const string& qname, vector<DNSResourceRecord>& ret, int depth);

0 comments on commit 5cdeede

Please sign in to comment.