]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add support for "NONE" SOA-EDIT kind
authorVitkor Velchev <ngshosting@gmail.com>
Thu, 20 Oct 2016 13:01:11 +0000 (09:01 -0400)
committermind04 <mind04@monshouwer.org>
Tue, 9 May 2017 12:17:06 +0000 (14:17 +0200)
Setting the "SOA-EDIT" value for a zone to "NONE" causes an error:
'SOA-EDIT type 'NONE' for zone ZONENAME is unknown.'

pdns/serialtweaker.cc

index 850071315c4f40f264c6d0a8e92161d831ab0211..1dc3cfa062ef88543df49eb3f93ec31f6adf6d54 100644 (file)
@@ -98,7 +98,11 @@ uint32_t calculateEditSOA(SOAData sd, const string& kind) {
     uint32_t inception = getStartOfWeek();
     if (sd.serial < inception)
       return inception;
-  } else if(!kind.empty()) {
+  }
+  else if(pdns_iequals(kind,"NONE")) {
+      return sd.serial;
+  }
+  else if(!kind.empty()) {
     L<<Logger::Warning<<"SOA-EDIT type '"<<kind<<"' for zone "<<sd.qname.toStringNoDot()<<" is unknown."<<endl;
   }
   return sd.serial;