From 9d423514125fa7919a8f37b01a16933c276a6a45 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Wed, 12 Aug 2015 21:00:41 +0300 Subject: [PATCH] Fix name handling for tsigkeyname and algorithm --- pdns/mastercommunicator.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/mastercommunicator.cc b/pdns/mastercommunicator.cc index f726ffb7e..c621b6250 100644 --- a/pdns/mastercommunicator.cc +++ b/pdns/mastercommunicator.cc @@ -226,7 +226,7 @@ void CommunicatorClass::sendNotification(int sock, const DNSName& domain, const string tsigsecret; if (B.getDomainMetadata(domain, "TSIG-ALLOW-AXFR", meta) && meta.size() > 0) { - tsigkeyname.toStringNoDot() = meta[0]; + tsigkeyname = DNSName(meta[0]); } vector packet; @@ -237,8 +237,8 @@ void CommunicatorClass::sendNotification(int sock, const DNSName& domain, const if (tsigkeyname.empty() == false) { B.getTSIGKey(tsigkeyname, &tsigalgorithm, &tsigsecret64); TSIGRecordContent trc; - if (tsigalgorithm == "hmac-md5") - trc.d_algoName = tsigalgorithm + ".sig-alg.reg.int."; + if (tsigalgorithm.toStringNoDot() == "hmac-md5") + trc.d_algoName = DNSName(tsigalgorithm.toStringNoDot() + ".sig-alg.reg.int."); else trc.d_algoName = tsigalgorithm; trc.d_time = time(0); -- 2.40.0