Monday, April 2, 2007
MaraDNS snapshot update: bind2csv2.py finished
OK, I've released a new snapshot of MaraDNS 1.3 today, a 2007.04.02 snapshot.
I have finally finished the bind2csv2.py script. My plan was to finish this script Sunday morning, then spend the afternoon enjoying the town. Alas, adding $ORIGIN and $TTL support was harder than I thought. The problem is this: Since bind2csv2 needs to rearrange the records, what happens when the default TTL or origin changes for a record we put elsewhere in the zonefile. Well, what needs to be done is to have the code add the explicit new TTL information to a record placed elsewhere in the file. I needed to rework a good deal of the design of the class in bind2csv2 to handle this change.
Once I did that, I was finally able to have it so rearranged records will have the correct origin or TTL information.
The next thing I had to do was add support for the last few record types, LOC, WKS, NSAP, and PX. I took the easy way out: The bind2csv2 parser does not check the syntax of these records. Records of this nature that have syntax errors will not have the errors caught until parsed by the csv2 parser.
I figured out how BIND parses backslashes in TXT records, and modified the bind2csv2 script to convert BIND-style backslash sequences in to csv2 backslash sequences. This code works, but I really need to polish it up a bit to make cleaner converted zone files in certain corner cases.
After doing all that, I set up BIND and started work comparing the zone file generated by the native BIND zone file and how MaraDNS parses a converted zone file. When doing this testing, I discovered a bug in the csv2 parsing code. So I worked on fixing that bug. Finally, past midnight, the csv2 parsing bug was fixed and I was able to continue.
Looks like there may be differences between the converted and native BIND zone file. At this point, I realized I had to go to bed in order to prepare for work the next day.
So, it looks like the bind2csv2 script is finished. Now I need to do some more bug testing with it.