On Tue, 06 Dec 2011 16:30:33 +0100, Nick Douma <[email protected]> wrote:

According to the docs, if I use the value 0 in place of the serial value
in the content of a SOA record, PowerDNS should retrieve the highest
change_date of all the records in that zone and use that as serial. My
record looks as follows:

example.com SOA ns1.example.net webmaster.example.net 0 16384 2048
1048576 900

When I retrieve the record using dig, I see:

$ host -t SOA example.com
oppai.nl has SOA record ns1.example.net webmaster.example.net 0 16384
2048 1048576 900

By any chance, are you using the pipe backend?

I remember having the same problem because my pipe backend script
would return the incorrect record format for a SOA query.

This is the relevant fix in my code, FWIW:

     if ($return_any || $qtype eq 'SOA') {
         if (my $soa_rec = soa_lookup($qname, $config)) {
# Transform our SOA record in the config to an RR as powerdns expects - my $soa_rr = [ $qname, $qclass, 'SOA', DEFAULT_SOA_TTL, -1, @{ $soa_rec } ];
+            my $soa_str = join ' ', @{ $soa_rec };
+ my $soa_rr = [ $qname, $qclass, 'SOA', DEFAULT_SOA_TTL, -1, $soa_str ];
             push @rr, $soa_rr;
         }
     }

Last part of the record was tab-delimited instead of space-delimited
as it should be.

--
Cosimo
_______________________________________________
Pdns-users mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to