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;
}