]> granicus.if.org Git - pdns/commitdiff
add 'INCREMENT-WEEKS' SOA-EDIT policy
authorBert Hubert <bert.hubert@netherlabs.nl>
Mon, 28 Mar 2011 10:35:22 +0000 (10:35 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Mon, 28 Mar 2011 10:35:22 +0000 (10:35 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2105 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/serialtweaker.cc

index a0e2e602ef41bd09c65caf25885afb66e1555079..d0b1dcb606baad59ecab8c5b5827412465a74639 100644 (file)
@@ -47,6 +47,11 @@ bool editSOA(DNSSECKeeper& dk, const string& qname, DNSPacket* dp)
        sd.serial = inception / (7*86400);
         rr.content = serializeSOAData(sd);
       }
+      else if(pdns_iequals(kind,"INCREMENT-WEEKS")) {        
+       time_t inception = getCurrentInception();
+       sd.serial += inception / (7*86400);
+       rr.content = serializeSOAData(sd);
+      }
       return true;
     }
   }