Subject: | Net::DNS::ZoneFile |
Date: | Tue, 31 May 2016 19:02:38 +0000 |
To: | "bug-Net-DNS [...] rt.cpan.org" <bug-Net-DNS [...] rt.cpan.org> |
From: | "White, Andrew" <Andrew.White2 [...] charter.com> |
Hi there,
I notice that Net::DNS::ZoneFile fails to parse records with class IN or type RR if they are mixed case. Example below. Is this a bug in Net::DNS::RR or Net::DNS::ZoneFile, or is this expected behavior? My reading of RFC-4343 is that these should be case-insensitive.
Andrew
$ cat example.com.hosts
$TTL 1D
@ IN SOA ns1.example.com. admin.example.com. (
2016053100 ;serial
2h ; refresh (2 hour)
1h ; retry (1 hour)
1W ; expire (1 week)
1D ) ; minimum or neg ttl (1 day)
IN NS ns1.example.com.
IN NS ns2.example.com.
foo In A 10.0.0.1
bar IN PTr foobar.example.com.
$ cat foo.pl
#!/usr/bin/perl
use strict;
use Net::DNS::RR;
use Net::DNS::ZoneFile;
my $zonefile = new Net::DNS::ZoneFile("example.com.hosts", "example.com");
if (! $zonefile) {
die("Error\n");
}
my @rr = $zonefile->read or die("Could not parse $zonefile\n");
foreach my $rr (@rr) {
print OUT $rr->plain . "\n";
}
$ ./foo.pl
unknown type PTr at /usr/local/share/perl5/Net/DNS/RR.pm line 660
file example.com.hosts line 13
at ./foo.pl line 12
unknown type In at /usr/local/share/perl5/Net/DNS/RR.pm line 660
file example.com.hosts line 12
at ./foo.pl line 12
Andrew White
Desk: 314.394-9594<sip:13143949594> | Cell: 314-452-4386<sip:1-314-452-4386> | Jabber<sip:andrew.white2@charter.com>
andrew.white2@charter.com<mailto:andrew.white2@charter.com>
Systems Engineer III, DAS DNS group
Charter Communications
12405 Powerscourt Drive<https://goo.gl/maps/AH2PXFKnaGU2>,<http://www.html5zombo.com/> St. Louis, MO 63131