]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
ixfrdist: Correctly retrieve the SOAs from the diff if needed
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 27 Aug 2018 13:35:34 +0000 (15:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 28 Aug 2018 09:01:17 +0000 (11:01 +0200)
They might be passed to makeIXFRDiff(), and the code to handle the
case where they aren't was broken.

pdns/ixfrdist.cc

index dc05c91f051c65ad1ddd7cf1854741f9174f6152..cd849dadfd1ea9ac340e284ed42645ce945b6e81 100644 (file)
@@ -198,11 +198,11 @@ static void makeIXFRDiff(const records_t& from, const records_t& to, ixfrdiff_t&
   set_difference(to.cbegin(), to.cend(), from.cbegin(), from.cend(), back_inserter(diff.additions), from.value_comp());
   diff.oldSOA = fromSOA;
   if (fromSOA == nullptr) {
-    getSOAFromRecords(from);
+    diff.oldSOA = getSOAFromRecords(from);
   }
   diff.newSOA = toSOA;
   if (toSOA == nullptr) {
-    getSOAFromRecords(to);
+    diff.newSOA = getSOAFromRecords(to);
   }
 }