Subject: | Class of MX records can be confused for Name |
Broken in 0.86 too, but unfortunately it is not in the list yet for me to choose!
Hi Simon,
This seems to be the same problem that you mentioned in bug 2254 except that it applies to MX records, resulting in the name being set to the class field. My patch is basically just a copy of your fix for that bug.
Still using Debian Linux 3.0r1, perl v5.6.1 built for i386-linux.
Cheers,
Alex
--- ZoneParse.pm.orig Wed Mar 26 10:18:21 2003
+++ ZoneParse.pm Wed Mar 26 10:18:39 2003
@@ -201,9 +201,14 @@
elsif (/($valid_name)? \s* $ttl_cls MX \s+ (\d+) \s+ ($valid_name)/ix)
{
# host ttl class mx pri dest
+ my ($name, $ttl, $class, $priority, $host) = ($1, $2, $3, $4, $5);
+ if (!$class && defined $name && $name =~ /^$rr_class$/) {
+ $class = uc $name;
+ undef $name;
+ }
push @{$dns_mx{$self}},
- _massage({ name => $1, priority => $4,
- host => $5, ttl => $2, class => $3})
+ _massage({ name => $name, priority => $priority,
+ host => $host, ttl => $ttl, class => $class})
}
elsif (/($valid_name) \s+ $ttl_cls
SOA \s+ ($valid_name) \s+ ($valid_name) \s*