diff --git a/lib/dns/include/dns/validator.h b/lib/dns/include/dns/validator.h index 445279a9eb..362e7e7e3f 100644 --- a/lib/dns/include/dns/validator.h +++ b/lib/dns/include/dns/validator.h @@ -151,6 +151,7 @@ struct dns_validator { bool digest_sha1; uint8_t unsupported_algorithm; uint8_t unsupported_digest; + uint8_t validation_attempts; dns_rdata_t rdata; bool resume; isc_counter_t *nvalidations; diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 26cc6e4a5c..0cd2cfb6c2 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -2118,6 +2118,8 @@ validate_dnskey_dsset(dns_validator_t *val) { return DNS_R_BADALG; } + val->validation_attempts++; + /* * Find the DNSKEY matching the DS... */ @@ -2189,6 +2191,11 @@ validate_dnskey_dsset_next_done(void *arg) { return; } + if (val->validation_attempts != 0) { + val->unsupported_algorithm = 0; + val->unsupported_digest = 0; + } + validate_dnskey_dsset_done(val, result); return; }