Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: alex.woods [...] concept2100.co.uk
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.84
Fixed in: (no value)



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) {
[guest - Tue Mar 18 09:39:06 2003]: Show quoted text
> 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. >
Hi, Thanks for reporting this. I think it used to do that in an earlier version. I've just uploader version 0.85 to CPAN. And I've updated the tests to check this works. Unfortunately it wasn't a simple patch. because the only mandatory fields (according to RFC 1035) are the record type and the record data. So this is valid: ; snip ... foo IN A 10.0.0.1 IN A 10.0.0.2 A 10.0.0.3 bar IN A 10.0.0.1 ;... The tricky one was the second record, because it was being interpreted as: IN IN A 10.0.0.2 Anyway, thanks for reporting this bug! --simonflk