pdns
pdns copied to clipboard
BIND backend reports unknown type 'secondary' but doesn't report unknown keyword 'primaries'
- Program: Authoritative
- Issue type: Bug report
Short description
PowerDNS Authoritative with the BIND backend correctly reports a zone type secondary as unknown, but it doesn't complain about missing primary servers when the secondary (slave) zone is configured with primaries instead of masters.
$ cat named.conf
zone "a1.dnslab.org" IN {
type secondary;
primaries { 192.0.2.1; };
file "/etc/pdns/a1";
};
Environment
- Operating system: CentOS Linux 8
- Software version: 4.7.0-alpha0.192.master.g3f4b183ea
- Software source: repo.powerdns.com
Steps to reproduce
- Configure
pdns.confbind-config=/etc/pdns/named.conf daemon=no disable-axfr=no disable-syslog=yes guardian=no launch=bind log-dns-details=yes master=no secondary=yes setgid=pdns setuid=pdns slave=yes - Configure
named.confzone "a1.dnslab.org" IN { type secondary; primaries { 192.0.2.1; }; file "/etc/pdns/a1"; }; - Launch PowerDNS
# pdns_server Jan 13 12:53:40 [bindbackend] Parsing 1 domain(s), will report when done Jan 13 12:53:40 [bindbackend] Warning! Skipping zone 'a1.dnslab.org' because type 'secondary' is invalid Jan 13 12:53:40 [bindbackend] Done parsing domains, 1 rejected, 0 new, 0 removed - Replace
secondarybyslaveinnamed.conf - Launch
# pdns_server Jan 13 13:05:26 [bindbackend] Parsing 1 domain(s), will report when done Jan 13 13:05:26 [bindbackend] error at 2022-01-13 13:05:26 +0000 no file found for new slave domain 'a1.dnslab.org'. Has not been AXFR'd yet Jan 13 13:05:26 [bindbackend] Done parsing domains, 1 rejected, 1 new, 0 removed - Replace
primariesbymastersinnamed.conf - Launch
# pdns_server Jan 13 13:06:13 [bindbackend] Parsing 1 domain(s), will report when done Jan 13 13:06:13 [bindbackend] error at 2022-01-13 13:06:13 +0000 no file found for new slave domain 'a1.dnslab.org'. Has not been AXFR'd yet Jan 13 13:06:13 [bindbackend] Done parsing domains, 1 rejected, 1 new, 0 removed ... Jan 13 13:06:13 Zone 'a1.dnslab.org' (/etc/pdns/a1) reloaded Jan 13 13:06:13 AXFR-in zone: 'a1.dnslab.org', primary: '137.184.55.191', zone committed with serial 3
Expected behaviour
I expected PowerDNS to report that the word primaries is unknown or that there are no primaries/masters configured for the secondary zone.
Actual behaviour
No diagnostic message, and no transfer of the secondary zone.
I believe we ignore unknown commands inside zone { } and we simply do not recognise primaries yet.