mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
fix: nil: Fast fail a validator deadlock
Fail with a specific error code if we detect a deadlock in the validator. Closes #5769 Merge branch '5769-deadlock-validator' into 'main' See merge request isc-projects/bind9!11622
This commit is contained in:
commit
5932af66c8
3 changed files with 4 additions and 2 deletions
|
|
@ -972,7 +972,7 @@ create_fetch(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type,
|
|||
if (check_deadlock(val, name, type, NULL, NULL)) {
|
||||
validator_log(val, ISC_LOG_DEBUG(3),
|
||||
"deadlock found (create_fetch)");
|
||||
return DNS_R_NOVALIDSIG;
|
||||
return ISC_R_DEADLOCK;
|
||||
}
|
||||
|
||||
if ((val->options & DNS_VALIDATOR_NOCDFLAG) != 0) {
|
||||
|
|
@ -1016,7 +1016,7 @@ create_validator(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type,
|
|||
if (check_deadlock(val, name, type, rdataset, sig)) {
|
||||
validator_log(val, ISC_LOG_DEBUG(3),
|
||||
"deadlock found (create_validator)");
|
||||
return DNS_R_NOVALIDSIG;
|
||||
return ISC_R_DEADLOCK;
|
||||
}
|
||||
|
||||
/* OK to clear other options, but preserve NOCDFLAG and NONTA. */
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ typedef enum isc_result {
|
|||
ISC_R_HTTP2ALPNERROR, /*%< ALPN for HTTP/2 failed */
|
||||
ISC_R_DOTALPNERROR, /*%< ALPN for DoT failed */
|
||||
ISC_R_INVALIDPROTO, /*%< invalid protocol */
|
||||
ISC_R_DEADLOCK, /*%< deadlock found */
|
||||
|
||||
DNS_R_LABELTOOLONG,
|
||||
DNS_R_BADESCAPE,
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[ISC_R_HTTP2ALPNERROR] = "ALPN for HTTP/2 failed",
|
||||
[ISC_R_DOTALPNERROR] = "ALPN for DoT failed",
|
||||
[ISC_R_INVALIDPROTO] = "invalid protocol",
|
||||
[ISC_R_DEADLOCK] = "deadlock found",
|
||||
|
||||
[DNS_R_LABELTOOLONG] = "label too long",
|
||||
[DNS_R_BADESCAPE] = "bad escape",
|
||||
|
|
|
|||
Loading…
Reference in a new issue