I recently upgraded bind9 on my primary nameserver and soon after I noticed that one particular zone would no longer transfer to my secondary nameservers, which run PowerDNS. All the PowerDNS servers were saying:
Nov 18 00:25:26 daiquiri pdns_server: While checking domain freshness: Query to '2001:ba8:1f1:f085::53' for SOA of 'example.com' did not return a SOA
The confusing thing was that manually using
dig to query for this did work fine:
daiquiri$ dig +short -t soa example.com @2001:ba8:1f1:f085::53 ns0.example.com. bind.example.com. 1668670704 28800 14400 3600000 86400
After scratching my head for several hours over this yesterday, I eventually broke out
tcpdump and was surprised to see that the response to PowerDNS’s SOA query was indeed empty. And it was also truncated!
Back to dig, I could see that this zone was DNSSEC-signed and the SOA query with DNSSEC info was 2293 bytes in size:
daiquiri$ dig +dnssec -t soa example.com @2001:ba8:1f1:f085::53 | grep MSG ;; MSG SIZE rcvd: 2293
That’s bigger than a DNS response can be in UDP, so it truncates and the client is supposed to retry over TCP.
dig has no problem doing that, but PowerDNS can’t (yet).
Specifically what has changed in bind9 is the EDNS buffer size, down from its previous default of 4096 bytes to 1232 bytes.
I can stop PowerDNS from doing the SOA check at all by upgrading all PowerDNS servers to v4.7.x and using the
I could put bind9’s EDNS buffer size back up to 4096, but it doesn’t seem advisable to go over about 1400 bytes and so that won’t help.
For now I have enabled the minimal-
responses option in bind9, which drops extra records from the Authority and Additional sections of responses unless they are absolutely required. This reduces the response size of that SOA query to 685 bytes, so it no longer truncates and PowerDNS is happy.
I’m not sure if an SOA response can ever go above 1232 bytes now. Maybe as DNSSEC signatures get bigger. So this might not be a permanenet solution and hopefully PowerDNS will gain the ability to retry those SOA queries over TCP.