Subject: | PTR records are parsed with class and ttl reversed (patch) |
PTR records are parsed with class and TTL reversed. Here's the
relevant fragment of $zone->Dump :
'PTR' => [
{
'ttl' => 'IN',
'class' => '',
'host' => 'localhost.',
'name' => '1.0.0'
}
Patch follows (also attached):
ivan@rootwood:~/DEB/lib/libdns-zoneparse-perl$ diff -u DNS-ZoneParse-0.8/ZoneParse.pm DNS-ZoneParse-0.8-ptrfix/ZoneParse.pm
--- DNS-ZoneParse-0.8/ZoneParse.pm Wed Sep 26 13:53:51 2001
+++ DNS-ZoneParse-0.8-ptrfix/ZoneParse.pm Sat Apr 20 02:52:12 2002
@@ -193,7 +193,7 @@
retry=> $8.'', expire=> $9.'', minimumTTL => $10.''};
}
elsif ($RR =~ /([\d\.]+)\s+($rr_ttl)?\s*?($rr_class)?\s*?PTR\s+($valid_name)/i) {
- push (@{$self->{_Zone}->{PTR}}, {name => $1.'', class => $2.'', ttl => $3.'',
+ push (@{$self->{_Zone}->{PTR}}, {name => $1.'', class => $3.'', ttl => $2.'',
host => $4.''});
}
elsif ($RR =~ /($valid_name)\s+($rr_ttl)?\s*?($rr_class)?\s*?TXT\s+\"([^\"]*)\"/i) {
Please let me know if you need any additional information.
ivan@rootwood:~/DEB/lib/libdns-zoneparse-perl$ diff -u DNS-ZoneParse-0.8/ZoneParse.pm DNS-ZoneParse-0.8-ptrfix/ZoneParse.pm
--- DNS-ZoneParse-0.8/ZoneParse.pm Wed Sep 26 13:53:51 2001
+++ DNS-ZoneParse-0.8-ptrfix/ZoneParse.pm Sat Apr 20 02:52:12 2002
@@ -193,7 +193,7 @@
retry=> $8.'', expire=> $9.'', minimumTTL => $10.''};
}
elsif ($RR =~ /([\d\.]+)\s+($rr_ttl)?\s*?($rr_class)?\s*?PTR\s+($valid_name)/i) {
- push (@{$self->{_Zone}->{PTR}}, {name => $1.'', class => $2.'', ttl => $3.'',
+ push (@{$self->{_Zone}->{PTR}}, {name => $1.'', class => $3.'', ttl => $2.'',
host => $4.''});
}
elsif ($RR =~ /($valid_name)\s+($rr_ttl)?\s*?($rr_class)?\s*?TXT\s+\"([^\"]*)\"/i) {