]> 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)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Wed, 27 Jun 2018 13:18:10 +0000 (15:18 +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 fc2c075ffff4c42347f4099e6c6a23b704ee2605..7b1d7c7b9f0032950872750fd86eecbac67a699f 100644 (file)
@@ -65,7 +65,11 @@ uint32_t calculateEditSOA(uint32_t old_serial, const string& kind, const DNSName
     uint32_t inception = getStartOfWeek();
     if (old_serial < inception)
       return inception;
-  } else if(!kind.empty()) {
+  }
+  else if(pdns_iequals(kind,"NONE")) {
+    // do nothing to serial. needed because a metadata of "" will use the default-soa-edit setting instead.
+  }
+  else if(!kind.empty()) {
     g_log<<Logger::Warning<<"SOA-EDIT type '"<<kind<<"' for zone "<<zonename<<" is unknown."<<endl;
   }
   return old_serial;