PowerDNS/pdns — pull request #911 by stbuehler (2013-07-13 11:48:04+00:00)
Title: SOA-EDIT: fix INCEPTION-INCREMENT handling

Now that I installed 3.3 from debian experimental I realized that the logic is broken... My test zone has SOA 2013050801 in the db, and pdns returned 2013050803 - which is way too small, it should be something like 2013070901.

Please review the logic before merging :)
It should use inception day as serial if the backend serial is before inception day; it should increment by two if the backend serial is between inception day and two days later, and do nothing if backend serial is more than two days later.

It would be nice to have test cases for SOA-EDIT stuff; but it seems this would be a major change in the test handling. I think it would require different zones for the different SOA-EDIT values to test, somehow setting the SOA-EDIT values in the dnssec.sqlite3 (? I'm not sure how the bind/dnssec stuff is working), and generating zones with SOA values based on the current time. Or mocking the time() function to some static value with LD_PRELOAD or similar :)