From: Miod Vallat Date: Fri, 27 Jun 2025 06:32:48 +0000 (+0200) Subject: Add a few more explicit DNSName casts when computing record data. X-Git-Tag: rec-5.3.0-alpha2~43^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6205e4d5b340b884deae9df2b16ddbd78cb358c;p=thirdparty%2Fpdns.git Add a few more explicit DNSName casts when computing record data. Signed-off-by: Miod Vallat --- diff --git a/pdns/ixfrutils.cc b/pdns/ixfrutils.cc index 2eae98ec87..f81886f6f8 100644 --- a/pdns/ixfrutils.cc +++ b/pdns/ixfrutils.cc @@ -141,7 +141,7 @@ void writeZoneToDisk(const records_t& records, const ZoneName& zone, const std:: records_t soarecord; soarecord.insert(soa); - if (fprintf(filePtr.get(), "$ORIGIN %s\n", zone.toString().c_str()) < 0) { + if (fprintf(filePtr.get(), "$ORIGIN %s\n", zone.operator const DNSName&().toString().c_str()) < 0) { string error = "Error writing to zone file for " + zone.toLogString() + " in file " + fname + ".partial" + ": " + stringerror(); filePtr.reset(); unlink((fname+".partial").c_str()); diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 091007d8cf..b9cdc372f5 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1694,7 +1694,7 @@ static int createZone(const ZoneName &zone, const DNSName& nsname) { rr.qtype = "SOA"; string soa = ::arg()["default-soa-content"]; - boost::replace_all(soa, "@", zone.toStringNoDot()); + boost::replace_all(soa, "@", zone.operator const DNSName&().toStringNoDot()); SOAData sd; try { fillSOAData(soa, sd); @@ -2384,25 +2384,25 @@ static bool showZone(DNSSECKeeper& dnsseckeeper, const ZoneName& zone, bool expo } if (!exportDS) { cout << (key.d_flags == 257 ? "KSK" : "ZSK") << ", tag = " << key.getTag() << ", algo = "<<(int)key.d_algorithm << ", bits = " << bits << endl; - cout << "DNSKEY = " <getBeforeAndAfterNames(di.id, zone, DNSName("z")+zone.operator const DNSName&(), before, after); - cout<<"got '"<