PowerDNS bind zone parsing #3568

Closed
EricVeldhuyzen opened this Issue Mar 14, 2016 · 5 comments

Projects

None yet

4 participants

@EricVeldhuyzen

We use the Net::DNS perl module to format DNS records in a consistent way. This results for TXT records with long values in something like this:

bla       IN      TXT     (
          "v=spf1 include:spf.protection.outlook.com include:mail.foobar.nl -all"
          )

When Power DNS read a zonefile with these kind of records it doesn't produce an error (that I can see) but when an AXFR comes for a zone with such a record we see in the log:

Mar 14 12:54:12 dnssec1 pdns[2723]: Exception: Parsing record content: Data
field in DNS should start with quote (") at position 3 of '" "v=spf1
include:spf.protection.outlook.com include:mail.foobar.nl -all" "'
Mar 14 12:54:12 dnssec1 pdns[2723]: TCP Connection Thread died because of STL
error: Parsing record content: Data field in DNS should start with quote (") at
position 3 of '" "v=spf1 include:spf.protection.outlook.com
include:mail.foobar.nl -all" "'

It seems that the AXFR is not completely failing, only the records that are failing are missing after the AXFR, other records are present and updated, including the SOA (with the serial).

In some other cases the TXT record is read and returned, but after AXFR (from the hidden master) to our public masters we notice extra spaces inside the TXT records between the quote characters. For example, a string like

@   IN TXT (
   "LongBase64EncodedString"
   )

would become

@   IN TXT " LongBase64EncodedString "

We use pdns-static 3.4.7-1 amd64, downloaded from downloads.powerdns.com on Debian Wheezy.

@nlyan
Contributor
nlyan commented Mar 14, 2016

Does your hidden master return correct records when queried directly, e.g. with dig?

@Habbie Habbie added a commit to Habbie/pdns that referenced this issue Mar 14, 2016
@Habbie Habbie strip all types of whitespace from around content while parsing zones…
…, fixes #3568
eb08dd9
@Habbie
Member
Habbie commented Mar 14, 2016

@nlyan no, it SERVFAILs then

@Habbie Habbie added a commit to Habbie/pdns that referenced this issue Mar 15, 2016
@Habbie Habbie strip all types of whitespace from around content while parsing zones…
…, fixes #3568
0691896
@Habbie Habbie closed this in 0691896 Mar 15, 2016
@EricVeldhuyzen

Hi, I just tested the fix in the git master release. The problem is solved on this git version. Would you please be so kind to backport this also to the 3.4.* stable branch?

@Habbie
Member
Habbie commented Apr 25, 2016

Reopened for backporting.

@Habbie Habbie reopened this Apr 25, 2016
@Habbie Habbie closed this Apr 25, 2016
@Habbie Habbie reopened this Apr 25, 2016
@pieterlexis pieterlexis added this to the auth-3.4.9 milestone Apr 26, 2016
@pieterlexis
Member

fixed in #3769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment