Subject: | NSEC3->covered() should use case-insensitive comparisons |
The covered() method of Net::DNS::RR::NSEC3 should be using case-insensitive string comparison on the hashes-as-strings:
Index: NSEC3.pm
===================================================================
--- NSEC3.pm (revision 1068)
+++ NSEC3.pm (working copy)
@@ -318,18 +318,18 @@
$self->saltbin,
);
- if ( ($self->ownername() cmp $self->hnxtname() )== 1 ) {
+ if ( (lc($self->ownername()) cmp lc($self->hnxtname()) )== 1 ) {
# last name in the zone.
- return 1 if ( ( $hashedname cmp $self->hnxtname() ) == 1 );
- return 1 if ( ( $hashedname cmp $self->ownername() ) == -1 );
+ return 1 if ( ( lc($hashedname) cmp lc($self->hnxtname()) ) == 1 );
+ return 1 if ( ( lc($hashedname) cmp lc($self->ownername()) ) == -1 );
}
- elsif ( ($self->ownername() cmp $self->hnxtname() )== 0 ) {
+ elsif ( (lc($self->ownername()) cmp lc($self->hnxtname()) )== 0 ) {
# One entry in the zone.
return 1;
}else{
- return 1 if ( ($self->ownername() cmp $hashedname) == -1 )
+ return 1 if ( (lc($self->ownername()) cmp lc($hashedname)) == -1 )
&&
- ( ( $hashedname cmp $self->hnxtname() ) == -1 );
+ ( ( lc($hashedname) cmp lc($self->hnxtname()) ) == -1 );
}
return 0;