]> granicus.if.org Git - pdns/commitdiff
recursor: set the TSIG algoname on IXFR correctly
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 24 Feb 2016 17:14:31 +0000 (18:14 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 24 Feb 2016 17:14:31 +0000 (18:14 +0100)
pdns/ixfr.cc

index ad4ef2d6d991d1d66dba7128bb8e37905aa0fa0e..2170a7045695c0c5513b091c5308bfd6564ac939 100644 (file)
@@ -19,8 +19,14 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAd
 
   pw.commit();
   if(!tt.algo.empty()) {
+    TSIGHashEnum the;
+    getTSIGHashEnum(tt.algo, the);
     TSIGRecordContent trc;
-    trc.d_algoName = tt.algo;
+    try {
+      trc.d_algoName = getTSIGAlgoName(the);
+    } catch(PDNSException& pe) {
+      throw std::runtime_error("TSIG algorithm '"+tt.algo.toString()+"' is unknown.");
+    }
     trc.d_time = time((time_t*)NULL);
     trc.d_fudge = 300;
     trc.d_origID=ntohs(pw.getHeader()->id);