Package: dnssec-tools
Version: 1.7-3
Severity: important
Tags: upstream

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' )
        ];

-- System Information:
Debian Release: 6.0.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (50, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dnssec-tools depends on:
ii  bind9utils       1:9.7.3.dfsg-1~squeeze8 Utilities for BIND
ii  libnet-dns-perl  0.66-2                  Perform DNS queries from a Perl sc
ii  libnet-dns-sec-p 0.16-1                  DNSSEC extension to NET::DNS
ii  libtimedate-perl 1.2000-1                collection of modules to manipulat
ii  perl             5.10.1-17squeeze3       Larry Wall's Practical Extraction 

Versions of packages dnssec-tools recommends:
ii  bind9            1:9.7.3.dfsg-1~squeeze8 Internet Domain Name Server

dnssec-tools suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to