Skip to content

Commit

Permalink
- Fixes zonemaster#504
Browse files Browse the repository at this point in the history
  • Loading branch information
vlevigneron committed Mar 14, 2019
1 parent 79fe1de commit f9b479f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/Zonemaster/Engine/Constants.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ our @EXPORT_OK = qw[
$ALGO_STATUS_OTHER
$ALGO_STATUS_DELETE_DS
$ALGO_STATUS_INDIRECT_KEY
$BLACKLISTING_ENABLED
$DURATION_12_HOURS_IN_SECONDS
$DURATION_180_DAYS_IN_SECONDS
$FQDN_MAX_LENGTH
$LABEL_MAX_LENGTH
$IP_VERSION_4
$IP_VERSION_6
$LABEL_MAX_LENGTH
$MAX_SERIAL_VARIATION
$MINIMUM_NUMBER_OF_NAMESERVERS
$RESOLVER_SOURCE_OS_DEFAULT
Expand All @@ -54,7 +55,7 @@ our %EXPORT_TAGS = (
soa => [
qw($SOA_DEFAULT_TTL_MAXIMUM_VALUE $SOA_DEFAULT_TTL_MINIMUM_VALUE $SOA_EXPIRE_MINIMUM_VALUE $SOA_REFRESH_MINIMUM_VALUE $SOA_RETRY_MINIMUM_VALUE $DURATION_12_HOURS_IN_SECONDS $DURATION_180_DAYS_IN_SECONDS $MAX_SERIAL_VARIATION)
],
misc => [qw($UDP_PAYLOAD_LIMIT $UDP_COMMON_EDNS_LIMIT $MINIMUM_NUMBER_OF_NAMESERVERS $RESOLVER_SOURCE_OS_DEFAULT)]
misc => [qw($UDP_PAYLOAD_LIMIT $UDP_COMMON_EDNS_LIMIT $MINIMUM_NUMBER_OF_NAMESERVERS $RESOLVER_SOURCE_OS_DEFAULT $BLACKLISTING_ENABLED)]
, # everyting in %EXPORT_OK that isn't included in any of the other tags
addresses => [qw(@IPV4_SPECIAL_ADDRESSES @IPV6_SPECIAL_ADDRESSES)],
);
Expand All @@ -67,6 +68,8 @@ Readonly our $ALGO_STATUS_OTHER => 5;
Readonly our $ALGO_STATUS_DELETE_DS => 6;
Readonly our $ALGO_STATUS_INDIRECT_KEY => 7;

Readonly our $BLACKLISTING_ENABLED => 0;

Readonly our $DURATION_12_HOURS_IN_SECONDS => 12 * 60 * 60;
Readonly our $DURATION_180_DAYS_IN_SECONDS => 180 * 24 * 60 * 60;

Expand Down
2 changes: 1 addition & 1 deletion lib/Zonemaster/Engine/Nameserver.pm
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ sub _query {

my $before = time();
my $res;
if ( $self->blacklisted->{ $flags{usevc} }{ $flags{dnssec} } ) {
if ( $BLACKLISTING_ENABLED and $self->blacklisted->{ $flags{usevc} }{ $flags{dnssec} } ) {
Zonemaster::Engine->logger->add(
IS_BLACKLISTED => {
message => "Server transport has been blacklisted due to previous failure",
Expand Down

0 comments on commit f9b479f

Please sign in to comment.