From 3ebc80ce7bf434e9738a012c392b07b51812b8d3 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 9 Feb 2017 15:30:30 +0100 Subject: [PATCH] rec: Use `DNSName::makeLowerCase()` instead of converting to string and back --- pdns/pdns_recursor.cc | 2 +- pdns/slavecommunicator.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 7be428fa9..c107a4a19 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 0df99b075..07bcbcfdf 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; -- 2.40.0