Public bug reported:
If I run Net::DNS::ZoneFile::Fast::parse with zone text containing a
$INCLUDE directive, the second zone I try to parse returns only the
included records.
Test script:
use Net::DNS::ZoneFile::Fast;
use Data::Dumper;
open ZONE, 'something.com' or die;
$txt.=$_ while(<ZONE>);
close ZONE;
$r1=Net::DNS::ZoneFile::Fast::parse($txt);
print Dumper($r1);
open ZONE, 'whatever.com' or die;
$moink.=$_ while(<ZONE>);
close ZONE;
$r2=Net::DNS::ZoneFile::Fast::parse($moink);
print Dumper($r2);
Contents of 'something.com':
$TTL 1H
@ IN SOA ns0.something.com. hostmaster.something.com. (
2012112601 ; serial number YYYYMMDDNN
30m ; refresh
10m ; retry
1d ; expire
10m ) ; negative TTL
; Name servers
NS ns0.something.com.
NS ns1.something.com.
$INCLUDE "include-file"
Contents of 'whatever.com':
$TTL 1h
@ SOA ns0.whatever.com. hostmaster.whatever.com. (
2010112201 ; Serial
30m ; Refresh
10m ; Retry
10d ; Expire
30m ; Negative TTL
)
; Name servers
NS ns0.whatever.com.
NS ns1.whatever.com.
Contents of 'include-file':
wibble IN A 1.2.3.4
The second Dumper() output looks like
$VAR1 = [
bless( {
'ttl' => 0,
'name' => 'wibble',
'rdata' => '[binary data]',
'rdlength' => 4,
'Lines' => 1,
'Line' => 1,
'type' => 'A',
'class' => 'IN',
'address' => '1.2.3.4'
}, 'Net::DNS::RR::A' )
];
If I comment out the single entry in 'include-file', I get nothing at
all:
$VAR1 = [];
but if I comment out the $INCLUDE directive, the results are correct:
$VAR1 = [
bless( {
'minimum' => 1800,
'serial' => 2010112201,
'ttl' => 3600,
'mname' => 'ns0.whatever.com',
'name' => '',
'rdata' => '[binary data],
'retry' => 600,
'refresh' => 1800,
'rdlength' => 51,
'Lines' => 7,
'Line' => 3,
'type' => 'SOA',
'class' => 'IN',
'expire' => 864000,
'rname' => 'hostmaster.whatever.com'
}, 'Net::DNS::RR::SOA' ),
bless( {
'nsdname' => 'ns0.whatever.com',
'ttl' => 3600,
'name' => '',
'rdata' => '[binary data]',
'rdlength' => 18,
'Lines' => 1,
'Line' => 12,
'type' => 'NS',
'class' => 'IN'
}, 'Net::DNS::RR::NS' ),
bless( {
'nsdname' => 'ns1.whatever.com',
'ttl' => 3600,
'name' => '',
'rdata' => '[binary data]',
'rdlength' => 18,
'Lines' => 1,
'Line' => 13,
'type' => 'NS',
'class' => 'IN'
}, 'Net::DNS::RR::NS' )
];
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: dnssec-tools 1.13-1
ProcVersionSignature: Ubuntu 3.5.0-18.29-generic 3.5.7
Uname: Linux 3.5.0-18-generic x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Mon Nov 26 10:01:46 2012
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-05-04 (205 days ago)
InstallationMedia: Xubuntu 12.04 LTS "Precise Pangolin" - Release amd64
(20120425)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: dnssec-tools
UpgradeStatus: Upgraded to quantal on 2012-11-01 (24 days ago)
** Affects: dnssec-tools (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug quantal
** Summary changed:
- Net::DNS::ZoneFile::Fast::parse returns bad data after reading a zone with
$INCLUDE
+ Net::DNS::ZoneFile::Fast::parse returns bad data after reading zone text
containing $INCLUDE
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1083109
Title:
Net::DNS::ZoneFile::Fast::parse returns bad data after reading zone
text containing $INCLUDE
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dnssec-tools/+bug/1083109/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs