[Pdns-dev] [PATCH] Implement "Serial Number Arithmetic" (RFC 1982)

Dean Anderson dean at av8.com
Thu Aug 7 13:14:22 CEST 2008


On Wed, 6 Aug 2008, Sven Wegener wrote:

> (I posted this patch about half a year ago, but haven't received any 
> response, so I'm reposting)
> 
> Hi all,
> 
> "Serial Number Arithmetic" (also known as "sequence space arithmetic") is 
> the magic that makes the SOA serial 536870912 higher/newer than 
> 3113851289. It is the magic that helps you to reset your serial, if you 
> have screwed it up and a slave is not going to perform a zone transfer, 
> because its local copy of the zone has a serial larger than yours.
> 
> A serial by itself does not have any meaning. It can only be compared to 
> another serial. Starting from your current serial, the next 2^31-1 
> (2147483647) serials (wrapping around after 4294967295 to 0) are 
> considered higher. The 2^31-1 serial coming before your serial (wrapping 
> around after 0 to 4294967295) are considered lower. There are some cases 
> that are undefined. Taking the serials 536870912 and 2684354560, you would 
> clearly say that the latter is higher than the former. But in sequence 
> space arithmetic neither is higher or lower than the other.

Your arithmetic isn't sensible. As you state it, there are no serial
numbers _lower_ than the current, since all 2^31-1 are higher.

If you screw up the zone, you need to increase it by 1 to prompt a
transfer. The only problem I've ever seen people have is when they try
to use a date as a serial number, then mess up the date and subsequently
want to 'lower' the serial number.  The only way this can be fixed at
present is by nuking the slave zone on the slave server. Restarting the
slave server isn't sufficient because the slave will see its local copy
is still newer than the master.

The only solution that really makes sense is to change the transfer
rules so that slaves always transfer a zone unless it is equal to the
master number, which is equivalent to what you propose, minus the
arithmetic chicanery.

		--Dean

-- 
Av8 Internet   Prepared to pay a premium for better service?
www.av8.net         faster, more reliable, better service
617 344 9000   




More information about the Pdns-dev mailing list