Skip Menu |

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

Report information
The Basics
Id: 39362
Status: resolved
Priority: 0/
Queue: Net-DNS-ZoneFile-Fast

People
Owner: wjhns117 [...] hardakers.net
Requestors: FANY [...] cpan.org
Cc: 305045 [...] rt.noris.net
AdminCc:

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



CC: 305045 [...] rt.noris.net
Subject: MX RRs with exchange .
Net::DNS::ZoneFile::Fast does not like MX RRs pointing to "." (to signalise that no mails should be sent to this domain), e.g. my.domain. 1D IN MX 0 . RFC 1035 is not absolutely clear about this issue, but since this form of MX RRs seems to work in practice, I think they should be correctly parsed by the module. Regards, fany
Well, I won't take the "is it legal" bait but we should parse as much as possible as we're not a lint checker but a loader for real life; fixed in next release.
On Mi. 17. Sep. 2008, 13:01:23, HARDAKER wrote: Show quoted text
> fixed in next release.
Thanks! However, I now get warnings from Net::DNS: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - zoneedit@dns0:/tmp > cat 39362 #!/usr/bin/perl -w use Net::DNS::ZoneFile::Fast; Net::DNS::ZoneFile::Fast::parse( fh => \*DATA, origin => 'example.org', ); __DATA__ test IN MX 0 . zoneedit@dns0:/tmp > ./39362 Use of uninitialized value $name in scalar chop at /usr/lib/perl5/Net/DNS.pm line 473, <DATA> line 1. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Here's a stacktrace: # main::__ANON__('Use of uninitialized value $name in scalar chop at /usr/lib/p...') called at /usr/lib/perl5/Net/DNS.pm line 473 # Net::DNS::stripdot('') called at /usr/lib/perl5/Net/DNS/RR/MX.pm line 82 # Net::DNS::RR::MX::_normalize_dnames('Net::DNS::RR::MX=HASH(0xa63e710)') called at /usr/lib/perl5/Net/DNS/RR.pm line 473 # Net::DNS::RR::new_from_hash('Net::DNS::RR', 'preference', 0, 'ttl', 0, 'name', 'test.example.org', 'class', 'IN', ...) called at /usr/share/perl5/Net/DNS/ZoneFile/Fast.pm line 193 # Net::DNS::ZoneFile::Fast::parse('fh', 'GLOB(0xa0b05b8)', 'origin', 'example.org') called at /tmp/edit.zone line 7 So the problem is that Net::DNS::RR->new_from_hash() is called with an empty value for exchange and that it does not really seem to like that. One could argue that it should treat that equal to "." (and maybe I'll open a bug report for Net::DNS, too), but on the other hand the warning could be avoided by not stripping the trailing dot from the exchange before calling Net::DNS::RR->new_from_hash(). (I wonder if there is any good reason for stripping it, anyway, because the documentation for Net::DNS::RR states: "All names must be fully qualified. The trailing dot (.) is optional.") BTW: I get the same warnings when running the test suite for Net::DNS::ZoneFile::Fast in conjunction with the current version 0.65 of Net::DNS. Kind regards, fany
This seems to have been fixed in the next version of Net::DNS, see https://rt.cpan.org/Ticket/Display.html?id=51009 for details.