Subject: | ZoneParse requires unrequired class field in records |
Records without a class field (IN|HS|CH) aren't accepted by ZoneParse, but it's valid for this field to not be present. Fix attached.
Environment info: Debian Linux 3.0r1, perl v5.6.1 built for i386-linux.
--- ZoneParse.pm.orig Tue Mar 18 13:46:51 2003
+++ ZoneParse.pm Tue Mar 18 13:46:24 2003
@@ -182,7 +182,7 @@
my $rr_class = qr/in|hs|ch/i;
my $rr_types = qr/ns|a|cname/i;
my $rr_ttl = qr/(?:\d+[wdhms]?)+/i;
- my $ttl_cls = qr/(?:($rr_ttl)\s+)?(?:\b($rr_class)\s+)\s*/;
+ my $ttl_cls = qr/(?:($rr_ttl)\s+)?(?:\b($rr_class)\s+)?\s*/;
foreach (@$records) {
if (/^($valid_name)? \s* $ttl_cls ($rr_types) \s+ ($valid_name)/ix) {