Subject: | DNS::ZoneParse not parsing .ca domains correctly? |
Hi. System rundown:
Perl 5.6.1
DNS::ZoneParse 0.87
Redhat Linux 7.2, 2.4.9 kernel
When I load a .ca domain into DNS::ZoneParse's new method, it seems to get a little confused. I've been parsing a lot of zones today and all seem to work just fine, except for .ca domains:
Here's the raw zone data (don't ask about the bizarre values; we're importing the zones from another company):
$ORIGIN .
$TTL 2560 ; 42 minutes 40 seconds
mungeddomain.ca IN SOA ns.mungeddomain.ca. hostmaster.mungeddomain.ca. (
1051383609 ; serial
16384 ; refresh (4 hours 33 minutes 4 seconds)
2048 ; retry (34 minutes 8 seconds)
1048576 ; expire (1 week 5 days 3 hours 16 minutes 16 seconds)
2560 ; minimum (42 minutes 40 seconds)
)
$TTL 4 ; 4 seconds
NS ns.mungeddomain.ca.
A 10.10.10.10
MX 0 mail.othermungeddomain.net.
$ORIGIN mungeddomain.ca.
* A 10.10.10.11
MX 0 mail.othermungeddomain.net.
ns A 10.10.10.12
A 10.10.10.13
Here's what the output() method gives directly *after* new() (ie. without any intermediary munging done on my part):
;
; Database file eh-unconv/db.mungeddomain.ca for zone.
; Zone version:
;
$TTL 4
4 IN SOA (
; serial number
; refresh
; retry
; expire
; minimum TTL
)
;
; Zone NS Records
;
mungeddomain.c NS ns.mungeddomain.ca.
;
; Zone MX Records
;
mungeddomain.c MX 0 mail.othermungeddomain.net.
* MX 0 mail.othermungeddomain.net.
;
; Zone Records
;
mungeddomain.c A IN
mungeddomain.c A 10.10.10.10
* A 10.10.10.11
ns A 10.10.10.12
ns A 10.10.10.13
It's lopping off the 'a' in '.ca' for all .ca domains I've tried this on (165, and please note that not all have bizarre TTLs like this example and they still get confused), all with the same results. And it's getting confused with the A record for the domain. I've been looking through the code and haven't found anything yet that might be causing it. I haven't totally ruled out something being wrong with my code, but even as a one-liner I get the same results for the above zone file:
perl -MDNS::ZoneParse -e 'my $o = new DNS::ZoneParse("db.advert.ca"); print $o->output()'
P.S. Love this module. It's been a life-saver already for several projects. Thanks!