From: Aki Tuomi Date: Wed, 12 Aug 2015 18:00:41 +0000 (+0300) Subject: Fix name handling for tsigkeyname and algorithm X-Git-Tag: dnsdist-1.0.0-alpha2~40^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d423514125fa7919a8f37b01a16933c276a6a45;p=pdns Fix name handling for tsigkeyname and algorithm --- 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);