]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Use `DNSName::makeLowerCase()` instead of converting to string and back 5004/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 9 Feb 2017 14:30:30 +0000 (15:30 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 9 Feb 2017 14:43:27 +0000 (15:43 +0100)
pdns/pdns_recursor.cc
pdns/slavecommunicator.cc

index 7be428fa9af677fe232e0ca807aa1168a77bd531..c107a4a19988d7ad9120136adb7a142ae79509a3 100644 (file)
@@ -728,7 +728,7 @@ void startDoResolve(void *p)
 
     // DO NOT MOVE THIS CODE UP - DNSPacketWriter needs to get the original-cased version
     if (g_lowercaseOutgoing)
-      dc->d_mdp.d_qname = DNSName(toLower(dc->d_mdp.d_qname.toString()));
+      dc->d_mdp.d_qname = dc->d_mdp.d_qname.makeLowerCase();
 
     uint32_t minTTL=std::numeric_limits<uint32_t>::max();
 
index 0df99b07543e2fe507f3fc7c016164dc82507fe9..07bcbcfdfce61a45c9e47cc9b53ce4c43400566b 100644 (file)
@@ -199,7 +199,7 @@ static bool processRecordForZS(const DNSName& domain, bool& firstNSEC3, DNSResou
       throw PDNSException("Zones with a mixture of Opt-Out NSEC3 RRs and non-Opt-Out NSEC3 RRs are not supported.");
     zs.optOutFlag = ns3rc.d_flags & 1;
     if (ns3rc.d_set.count(QType::NS) && !(rr.qname==domain)) {
-      DNSName hashPart = DNSName(toLower(rr.qname.makeRelative(domain).toString()));
+      DNSName hashPart = rr.qname.makeRelative(domain).makeLowerCase();
       zs.secured.insert(hashPart);
     }
     return false;