Subject: | incorrect IPv6 parsing |
When parsing a zone with ip v6 (AAAA) records, those records are removed..
This patch should fix the issue.
*** ZoneParse.pm.orig Sun May 11 23:03:52 2003
--- ZoneParse.pm Thu Jul 24 15:28:50 2003
***************
*** 178,186 ****
$dns_id{$self} = _massage({ ZoneFile => $1 || $zonefile, Origin => $3 });
my $records = $self->_clean_records($contents);
! my $valid_name = qr/[\@a-z_\-\.0-9\*]+/i;
my $rr_class = qr/\b(?:in|hs|ch)\b/i;
! my $rr_types = qr/\b(?:ns|a|cname)\b/i;
my $rr_ttl = qr/(?:\d+[wdhms]?)+/i;
my $ttl_cls = qr/(?:($rr_ttl)\s+)?(?:\b($rr_class)\s+)?\s*/;
--- 178,186 ----
$dns_id{$self} = _massage({ ZoneFile => $1 || $zonefile, Origin => $3 });
my $records = $self->_clean_records($contents);
! my $valid_name = qr/[\@a-z_\-\.0-9\*\:]+/i;
my $rr_class = qr/\b(?:in|hs|ch)\b/i;
! my $rr_types = qr/\b(?:ns|a|aaaa|cname)\b/i;
my $rr_ttl = qr/(?:\d+[wdhms]?)+/i;
my $ttl_cls = qr/(?:($rr_ttl)\s+)?(?:\b($rr_class)\s+)?\s*/;
***************
*** 197,204 ****
$class = uc $name;
undef $name;
}
! my $dns_thing = uc $type eq 'NS' ? $dns_ns{$self}
! : uc $type eq 'A' ? $dns_a{$self} : $dns_cname{$self};
push @$dns_thing,
_massage({name => $name, class=> $class,
host => $host, ttl => $ttl})
--- 197,207 ----
$class = uc $name;
undef $name;
}
! my $dns_thing = uc $type eq 'NS' ? $dns_ns{$self}
! : uc $type eq 'A' ? $dns_a{$self}
! : uc $type eq 'AAAA' ? $dns_a4{$self}
! : $dns_cname{$self};
!
push @$dns_thing,
_massage({name => $name, class=> $class,
host => $host, ttl => $ttl})