From: Remi Gacogne Date: Thu, 9 Feb 2017 14:30:30 +0000 (+0100) Subject: rec: Use `DNSName::makeLowerCase()` instead of converting to string and back X-Git-Tag: rec-4.1.0-alpha1~281^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5004%2Fhead;p=thirdparty%2Fpdns.git rec: Use `DNSName::makeLowerCase()` instead of converting to string and back --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 7be428fa9a..c107a4a199 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -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::max(); diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index 0df99b0754..07bcbcfdfc 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -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;