From f48c35c07dae04ab409f007d242b71692d49d5da Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 19 Dec 2016 17:43:18 +0100 Subject: [PATCH] Auth: Cleanup `DNSName::getRawLabels()` usage No real issue I'm aware of, but it's cleaner that way. --- pdns/packethandler.cc | 2 +- pdns/pdnsutil.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 3fc3b79518..d5c40f66f4 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -334,7 +334,7 @@ vector PacketHandler::getBestDNAMESynth(DNSPacket *p, SOAData& sd if(!ret.empty()) return ret; if(subdomain.countLabels()) - prefix+= DNSName(subdomain.getRawLabels()[0]); // XXX DNSName pain this feels wrong + prefix.appendRawLabel(subdomain.getRawLabels()[0]); // XXX DNSName pain this feels wrong if(subdomain == sd.qname) // stop at SOA break; diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 67c0a76d25..75b227270a 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -638,7 +638,7 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, const vect for(const auto &i: tlsas) { DNSName name = DNSName(i); - name.trimToLabels(name.getRawLabels().size()-2); + name.trimToLabels(name.countLabels()-2); if (cnames.find(name) == cnames.end() && noncnames.find(name) == noncnames.end()) { // No specific record for the name in the TLSA record exists, this // is already worth emitting a warning. Let's see if a wildcard exist. -- 2.47.2