Skip Menu |

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

Report information
The Basics
Id: 127653
Status: rejected
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: FANY [...] cpan.org
Cc: NNIS-10017 [...] jira.noris.de
AdminCc:

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



CC: NNIS-10017 [...] jira.noris.de
Subject: Net::DNS ≥ 1.06_06 generates broken SOA RRs
That is, the parentheses around the RDATA values are missing: $ perl -Ilib -MNet::DNS -E 'say Net::DNS->VERSION;$soa=Net::DNS::RR->new("@ARGV");say$soa->rdatastr' 'name SOA mname rname 0 14400 3600 1814400 3600' 1.0606 mname. rname. 0 ;serial 14400 ;refresh 3600 ;retry 1814400 ;expire 3600 ;minimum In older versions they were OK: $ perl -Ilib -MNet::DNS -E 'say Net::DNS->VERSION;$soa=Net::DNS::RR->new("@ARGV");say$soa->rdatastr' 'name SOA mname rname 0 14400 3600 1814400 3600' 1.06 ( mname. rname. 0 ;serial 14400 ;refresh 3600 ;retry 1814400 ;expire 3600 ;minimum ) The functionality was probably broken by the following commit: commit 24621a508c1ac518e1a518b3be4ecff80a6be89c Author: willem <willem@a29f3fcb-687d-e111-8194-001676cd6a66> Date: Tue Jun 7 09:04:50 2016 +0000 Generic method for annotating formatted rdata with comments git-svn-id: https://www.net-dns.org/svn/net-dns/trunk@1488 a29f3fcb-687d-e111-8194-001676cd6a66
On Fri Nov 16 08:03:03 2018, FANY wrote: Show quoted text
> That is, the parentheses around the RDATA values are missing: > > $ perl -Ilib -MNet::DNS -E 'say Net::DNS->VERSION;$soa=Net::DNS::RR-
> >new("@ARGV");say$soa->rdatastr' 'name SOA mname rname 0 14400 3600
> 1814400 3600' > 1.0606 > mname. rname. > 0 ;serial > 14400 ;refresh > 3600 ;retry > 1814400 ;expire > 3600 ;minimum > > > In older versions they were OK:
Arguably, it is the older versions that are broken. RFC1035 requires that line terminations are to be ignored within parentheses in RR entries in master files. What it does *not* say, nor does it imply, that the parentheses form part of the RDATA. The parentheses are syntactically necessary to aggregate the lines of each individual RR within a master file into a single parsable entity. The string produced by $rr->rdstring() [aka rdatastr] always contains the entire RDATA, therefore the question of aggregation never arises. Neither can I think of any sensible use-case which would involve parsing the result from rdstring().