[Pdns-users] Autoserial on domains not working as expected?
Derrik Pates
dpates at dsdk12.net
Sun Aug 3 19:53:04 UTC 2003
Playing with PowerDNS some more, I noticed that when an SOA query is
made by a DNS client while using autoserial mode on a domain (serial in
the SOA entry as 0), instead of returning the newest timestamp from the
records for the domain, it just returns whatever the current time was
when the query was executed. Looking through the code, I see that
DNSBackend::getSOA() has a (sub-optimal) method of getting the serial by
walking every record in the domain. DNSPacket::addSOARecord(), on the
other hand (which as far as I can tell is what gets called when an
external client asks for an SOA record either by asking explicitly for
the SOA or by doing an AXFR), just uses time() to get the current time
and uses that as the serial. Shouldn't there be an actual query that
gets the serial number, like "select max(change_date) from records where
domain_id=[idnum]"? Seems like that'd make more sense.
--
Derrik Pates
dpates at dsdk12.net
dpates at voxel.net
More information about the Pdns-users
mailing list