Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 114918
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: Andrew.White2 [...] charter.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Another bug? Net::DNS::ZoneFile
Date: Tue, 31 May 2016 20:06:06 +0000
To: "bug-Net-DNS [...] rt.cpan.org" <bug-Net-DNS [...] rt.cpan.org>
From: "White, Andrew" <Andrew.White2 [...] charter.com>
Another bug report. Net::DNS::ZoneFile barfs with an error if there is an implied @ after an $ORIGIN line. # 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. $ORIGIN example.com. IN A 1.2.3.4 # ./foo.pl example.com. 86400 IN SOA ns1.example.com. admin.example.com. 2016053100 7200 3600 604800 86400 example.com. 86400 IN NS ns1.example.com. example.com. 86400 IN NS ns2.example.com. Can't call method "string" on an undefined value at /usr/local/share/perl5/Net/DNS/RR.pm line 332. # 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 $rr->plain . "\n"; } 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 From: White, Andrew Sent: Tuesday, May 31, 2016 2:03 PM To: 'bug-Net-DNS@rt.cpan.org' Subject: Net::DNS::ZoneFile 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

Message body is not shown because it is too large.

From: rwfranks [...] acm.org
On Tue May 31 16:06:26 2016, Andrew.White2@charter.com wrote: Show quoted text
> Another bug report. Net::DNS::ZoneFile barfs with an error if there is > an implied @ after an $ORIGIN line.
[snip] Show quoted text
> # ./foo.pl > example.com. 86400 IN SOA ns1.example.com. admin.example.com. > 2016053100 7200 3600 604800 86400 > example.com. 86400 IN NS ns1.example.com. > example.com. 86400 IN NS ns2.example.com. > Can't call method "string" on an undefined value at > /usr/local/share/perl5/Net/DNS/RR.pm line 332.
Guess this is Net::DNS 1.05 Implicit @ is handled properly in 1.06
Subject: RE: [rt.cpan.org #114918] Another bug? Net::DNS::ZoneFile
Date: Wed, 1 Jun 2016 11:17:34 +0000
To: "bug-Net-DNS [...] rt.cpan.org" <bug-Net-DNS [...] rt.cpan.org>
From: "White, Andrew" <Andrew.White2 [...] charter.com>
Hi Dick, I updated Net::DNS to 1.06, and indeed the bug is fixed. Thank you! Andrew Andrew White Desk: 314.394-9594 | Cell: 314-452-4386 | Jabber andrew.white2@charter.com Systems Engineer III, DAS DNS group Charter Communications 12405 Powerscourt Drive, St. Louis, MO 63131 Show quoted text
-----Original Message----- From: Dick Franks via RT [mailto:bug-Net-DNS@rt.cpan.org] Sent: Tuesday, May 31, 2016 6:53 PM To: White, Andrew Subject: [rt.cpan.org #114918] Another bug? Net::DNS::ZoneFile <URL: https://rt.cpan.org/Ticket/Display.html?id=114918 > On Tue May 31 16:06:26 2016, Andrew.White2@charter.com wrote:
> Another bug report. Net::DNS::ZoneFile barfs with an error if there is > an implied @ after an $ORIGIN line.
[snip]
> # ./foo.pl > example.com. 86400 IN SOA ns1.example.com. admin.example.com. > 2016053100 7200 3600 604800 86400 > example.com. 86400 IN NS ns1.example.com. > example.com. 86400 IN NS ns2.example.com. > Can't call method "string" on an undefined value at > /usr/local/share/perl5/Net/DNS/RR.pm line 332.
Guess this is Net::DNS 1.05 Implicit @ is handled properly in 1.06
This was fixed in 1.06