Skip Menu |

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

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

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

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



Subject: Name gets confused as Class in some cases
If the class isn't defined and the name contains a class in it, the class is set to the name. eg.: spin a 123.45.123.45 would be taken as in a 123.45.123.45 Fix attached. Could well be sub-optimal, I'm no perl guru. I'm still using Debian 3.0r1, perl v5.6.1 built for i386-linux. PS. Sorry for triggering bug 2253 to reopen by replying ;)
--- ZoneParse.pm.orig Tue Mar 25 12:54:22 2003 +++ ZoneParse.pm Tue Mar 25 12:55:20 2003 @@ -188,7 +188,7 @@ if (/^($valid_name)? \s* $ttl_cls ($rr_types) \s+ ($valid_name)/ix) { # host ttl class (ns/a/cname) dest my ($name, $ttl, $class, $type, $host) = ($1, $2, $3, $4, $5); - if (!$class && defined $name && $name =~ /$rr_class/) { + if (!$class && defined $name && $name =~ /\b($rr_class)\b/) { $class = uc $name; undef $name; }
Hi Alex Show quoted text
> If the class isn't defined and the name contains a class in it, the > class is set to the name. > > eg.: > spin a 123.45.123.45 > would be taken as > in a 123.45.123.45
Thanks again, that was a silly mistake. There's a new version on it's way to CPAN now. Show quoted text
> Fix attached. Could well be sub-optimal, I'm no perl guru. > I'm still using Debian 3.0r1, perl v5.6.1 built for i386-linux.
It was probably fine, but to be sure I anchored it to the beginning and end of the string: /^$rr_class$/ Show quoted text
> PS. Sorry for triggering bug 2253 to reopen by replying ;)
No problem --simon