]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
backend fixes for DNSNAame
authorbert hubert <bert.hubert@powerdns.com>
Fri, 2 Oct 2015 09:25:49 +0000 (11:25 +0200)
committerbert hubert <bert.hubert@powerdns.com>
Fri, 2 Oct 2015 09:25:49 +0000 (11:25 +0200)
modules/bindbackend/bindbackend2.cc
modules/geoipbackend/geoipbackend.cc

index c4baaced3480d3aef85159df2d487c004f2acb85..e35896aed99b282bba6349e9b01cd4b49f52ae3f 100644 (file)
@@ -415,7 +415,7 @@ void Bind2Backend::alsoNotifies(const DNSName& domain, set<string> *ips)
   }
   ReadLock rl(&s_state_lock);  
   for(state_t::const_iterator i = s_state.begin(); i != s_state.end() ; ++i) {
-    if(pdns_iequals(i->d_name,domain)) {
+    if(i->d_name == domain) {
       for(set<string>::iterator it = i->d_also_notify.begin(); it != i->d_also_notify.end(); it++) {
         (*ips).insert(*it);
       }
@@ -968,7 +968,7 @@ bool Bind2Backend::getBeforeAndAfterNamesAbsolute(uint32_t id, const std::string
       }
 
       wraponce = false;
-      while(iter == hashindex.end() || (!iter->auth && !(iter->qtype == QType::NS && !pdns_iequals(iter->qname, auth) && !ns3pr.d_flags)) || iter->nsec3hash.empty())
+      while(iter == hashindex.end() || (!iter->auth && !(iter->qtype == QType::NS && iter->qname!= auth && !ns3pr.d_flags)) || iter->nsec3hash.empty())
       {
         iter--;
         if(iter == hashindex.begin()) {
@@ -999,7 +999,7 @@ bool Bind2Backend::getBeforeAndAfterNamesAbsolute(uint32_t id, const std::string
     }
 
     wraponce = false;
-    while((!iter->auth && !(iter->qtype == QType::NS && !pdns_iequals(iter->qname, auth) && !ns3pr.d_flags)) || iter->nsec3hash.empty())
+    while((!iter->auth && !(iter->qtype == QType::NS && iter->qname != auth && !ns3pr.d_flags)) || iter->nsec3hash.empty())
     {
       iter++;
       if(iter == hashindex.end()) {
index 3170980f4efc3ca8f4afcf45e8f443054c7346fc..aece9146d03bfa5b456c1b52fb81defbe8e6b63b 100644 (file)
@@ -452,7 +452,7 @@ bool GeoIPBackend::getAllDomainMetadata(const DNSName& name, std::map<std::strin
 
   ReadLock rl(&s_state_lock);
   BOOST_FOREACH(GeoIPDomain dom, s_domains) {
-    if (pdns_iequals(dom.domain, name)) {
+    if (dom.domain == name) {
       if (hasDNSSECkey(dom.domain)) {
         meta[string("NSEC3NARROW")].push_back("1");
         meta[string("NSEC3PARAM")].push_back("1 0 1 f95a");
@@ -468,7 +468,7 @@ bool GeoIPBackend::getDomainMetadata(const DNSName& name, const std::string& kin
 
   ReadLock rl(&s_state_lock);
   BOOST_FOREACH(GeoIPDomain dom, s_domains) {
-    if (pdns_iequals(dom.domain, name)) {
+    if (dom.domain == name) {
       if (hasDNSSECkey(dom.domain)) {
         if (kind == "NSEC3NARROW")
           meta.push_back(string("1"));
@@ -485,7 +485,7 @@ bool GeoIPBackend::getDomainKeys(const DNSName& name, unsigned int kind, std::ve
   if (!d_dnssec) return false;
   ReadLock rl(&s_state_lock);
   BOOST_FOREACH(GeoIPDomain dom, s_domains) {
-    if (pdns_iequals(dom.domain, name)) {
+    if (dom.domain == name) {
       regex_t reg;
       regmatch_t regm[5];
       regcomp(&reg, "(.*)[.]([0-9]+)[.]([0-9]+)[.]([01])[.]key$", REG_ICASE|REG_EXTENDED);
@@ -528,7 +528,7 @@ bool GeoIPBackend::removeDomainKey(const DNSName& name, unsigned int id) {
   ostringstream path;
 
   BOOST_FOREACH(GeoIPDomain dom, s_domains) {
-    if (pdns_iequals(dom.domain, name)) {
+    if (dom.domain == name) {
       regex_t reg;
       regmatch_t regm[5];
       regcomp(&reg, "(.*)[.]([0-9]+)[.]([0-9]+)[.]([01])[.]key$", REG_ICASE|REG_EXTENDED);
@@ -562,7 +562,7 @@ int GeoIPBackend::addDomainKey(const DNSName& name, const KeyData& key) {
   int nextid=1;
 
   BOOST_FOREACH(GeoIPDomain dom, s_domains) {
-    if (pdns_iequals(dom.domain, name)) {
+    if (dom.domain == name) {
       regex_t reg;
       regmatch_t regm[5];
       regcomp(&reg, "(.*)[.]([0-9]+)[.]([0-9]+)[.]([01])[.]key$", REG_ICASE|REG_EXTENDED);
@@ -595,7 +595,7 @@ bool GeoIPBackend::activateDomainKey(const DNSName& name, unsigned int id) {
   if (!d_dnssec) return false;
   WriteLock rl(&s_state_lock);
   BOOST_FOREACH(GeoIPDomain dom, s_domains) {
-    if (pdns_iequals(dom.domain, name)) {
+    if (dom.domain == name) {
       regex_t reg;
       regmatch_t regm[5];
       regcomp(&reg, "(.*)[.]([0-9]+)[.]([0-9]+)[.]([01])[.]key$", REG_ICASE|REG_EXTENDED);
@@ -628,7 +628,7 @@ bool GeoIPBackend::deactivateDomainKey(const DNSName& name, unsigned int id) {
   if (!d_dnssec) return false;
   WriteLock rl(&s_state_lock);
   BOOST_FOREACH(GeoIPDomain dom, s_domains) {
-    if (pdns_iequals(dom.domain, name)) {
+    if (dom.domain == name) {
       regex_t reg;
       regmatch_t regm[5];
       regcomp(&reg, "(.*)[.]([0-9]+)[.]([0-9]+)[.]([01])[.]key$", REG_ICASE|REG_EXTENDED);