Skip Menu |

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

Report information
The Basics
Id: 3028
Status: resolved
Priority: 0/
Queue: DNS-ZoneParse

People
Owner: SIMONFLK [...] cpan.org
Requestors: thorarne [...] thorarne.no
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.90
Fixed in: (no value)



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})
Hello, Thankyou for posting this bug and patch. Version 0.91 is now on CPAN with these changes. Regards Simon Flack