]> granicus.if.org Git - pdns/commitdiff
Fix name handling for tsigkeyname and algorithm
authorAki Tuomi <cmouse@cmouse.fi>
Wed, 12 Aug 2015 18:00:41 +0000 (21:00 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Wed, 20 Jan 2016 11:17:00 +0000 (13:17 +0200)
pdns/mastercommunicator.cc

index f726ffb7e16c0f96be67ad02dbf7e70dc126b2f8..c621b6250e65a35ea28c648966868a6de6cf39bc 100644 (file)
@@ -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<uint8_t> 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);