Tuesday, April 3, 2007

Update on BIND zone file format



Well, it would seem that BIND acts a little unusual with its zone file format. In more detail, here is how BIND sets the TTL for a record without a TTL:
  • If the SOA record has a TTL, use the TTL of the last record with a TTL
  • If the SOA record does not have a TTL, use the "SOA minimum" TTL
The bind2csv2.py script correctly uses the Minimum TTL as a default TTL when the SOA record doesn't have a TTL, but doesn't correctly handle the case when the SOA record does have a TTL.

Also, the backslash handling in BIND TXT records is somewhat bizarre; \\ in a TXT record becomes two backslashes, not one backslash. So, I have to do some more backslash testing.

One very positive experience that I have been having while working on this is how nice Python is to work with. Python makes is very easy to make clean, maintainable code. I have been able to make fundamental changes to this script without too much effort, and still keep the code very clean.



OK, I have one uncnfirmed report that the 1.0 branch of MaraDNS may have a round robin rotation bug. The person who sent me the bug report is unwilling to give me his real mararc file and zone file that supposibly has this bug, so I am unable to reproduce this bug or even look at the zone file to see what may be causing the bug.

The reporter claims that MaraDNS 1.0.39 will incorrectly rotate a CNAME record from looking like this:


cname.domain.foo. CNAME a.domain.foo.
a.domain.foo. A 10.1.2.3
cname.domain.foo. NS ns1.domain.foo.
cname.domain.foo. NS ns2.domain.foo.
cname.domain.foo. NS ns3.domain.foo.


To looking like this:


cname.domain.foo. NS ns1.domain.foo.
cname.domain.foo. CNAME a.domain.foo.
a.domain.foo. A 10.1.2.3
cname.domain.foo. NS ns2.domain.foo.
cname.domain.foo. NS ns3.domain.foo.


Now, I've looked at the relevant part of the udpsuccess() routine in MaraDNS.c, and, well, this can't happen. Not the way the reporter described it. So, I can't fix this bug without more information.

So, I'm asking the MaraDNS community for some help here. If this is a problem you have seen, please send me a copy of your mararc file and a copy of your zone files via private email. Then I may be able to reproduce and address this possible bug.

In the meantime, the workaround is to disable round robin rotation by adding the following line to one's mararc file:


max_ar_chain = 2


- Sam