I've tracked the error down to "/usr/share/perl5/Net/DNS/ZoneFile/Fast.pm". It has three tests which all report "bad NSEC data" so I added unique numbers into each error message. The 2nd one generates the error. It appears the fault is in the regular expression. The code is:
} elsif (/\G(nsec3)[ \t]+/igc) {
error ("You are missing required modules for NSEC3 support")
if (!$nsec3capable);
if (/\G\s*(\d+)\s+(\d+)\s+(\d+)\s+([-0-9A-Fa-f]+)\s+($pat_maybefullname)\s+(.*?)$pat_skip$/gc) {
# XXX: set the typebm field ourselves?
my ($alg, $flags, $iters, $salt, $nxthash, $typelist) = ($1, $2, $3, $4, $5, $6); $typelist = join(" ",sort split(/\s+/,$typelist));
my $binhash = MIME::Base32::decode(uc($nxthash));
push @zone,
{ Line => $ln, name => $domain, class => "IN", ttl => $ttl, type => "NSEC3", hashalgo => $alg, flags => $flags, iterations => $iters, hnxtname => $nxthash, hnxtnamebin => $binhash, hashlength => length($binhash), salt => $salt, saltbin => pack("H*",$salt), saltlength => int(length($salt)/2), typelist => $typelist, typebm => Net::DNS::RR::NSEC::_typearray2typebm(split(/\s+/,$typelist)),
};
} else { error("bad NSEC data (#2)");
}
}
I've tracked the error down to "/usr/share/ perl5/Net/ DNS/ZoneFile/ Fast.pm" . It has three tests which all report "bad NSEC data" so I added unique numbers into each error message. The 2nd one generates the error. It appears the fault is in the regular expression. The code is:
} elsif (/\G(nsec3)[ \t]+/igc) { (\d+)\s+ (\d+)\s+ (\d+)\s+ ([-0-9A- Fa-f]+) \s+($pat_ maybefullname) \s+(.*? )$pat_skip$ /gc) {
($1, $2, $3, $4, $5, $6);
$typelist = join(" ",sort split(/ \s+/,$typelist) ); :decode( uc($nxthash) );
Line => $ln,
name => $domain,
class => "IN",
ttl => $ttl,
type => "NSEC3",
hashalgo => $alg,
flags => $flags,
iterations => $iters,
hnxtname => $nxthash,
hnxtnamebin => $binhash,
hashlength => length($binhash),
salt => $salt,
saltbin => pack("H*",$salt),
saltlength => int(length( $salt)/ 2),
typelist => $typelist,
typebm =>
Net: :DNS::RR: :NSEC:: _typearray2type bm(split( /\s+/,$ typelist) ),
error(" bad NSEC data (#2)");
error ("You are missing required modules for NSEC3 support")
if (!$nsec3capable);
if (/\G\s*
# XXX: set the typebm field ourselves?
my ($alg, $flags, $iters, $salt, $nxthash, $typelist) =
my $binhash = MIME::Base32:
push @zone,
{
};
} else {
}
}