mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-22 09:20:51 -05:00
validator must not indicate a validation failure by returning
ISC_R_NOTFOUND as that seriously confuses query_find(). Introduced new result codes DNS_R_NOVALIDSIG and DNS_R_NOVALIDNXT to use instead.
This commit is contained in:
parent
9bd874cb27
commit
e1f16346db
3 changed files with 13 additions and 7 deletions
|
|
@ -93,8 +93,10 @@
|
|||
#define DNS_R_NOJOURNAL (ISC_RESULTCLASS_DNS + 56)
|
||||
#define DNS_R_ALIAS (ISC_RESULTCLASS_DNS + 57)
|
||||
#define DNS_R_USETCP (ISC_RESULTCLASS_DNS + 58)
|
||||
#define DNS_R_NOVALIDSIG (ISC_RESULTCLASS_DNS + 59)
|
||||
#define DNS_R_NOVALIDNXT (ISC_RESULTCLASS_DNS + 60)
|
||||
|
||||
#define DNS_R_NRESULTS 59 /* Number of results */
|
||||
#define DNS_R_NRESULTS 61 /* Number of results */
|
||||
|
||||
/*
|
||||
* DNS wire format rcodes
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ static char *text[DNS_R_NRESULTS] = {
|
|||
"no journal", /* 56 */
|
||||
"alias", /* 57 */
|
||||
"use TCP", /* 58 */
|
||||
"no valid SIG", /* 59 */
|
||||
"no valid NXT" /* 60 */
|
||||
};
|
||||
|
||||
static char *rcode_text[DNS_R_NRCODERESULTS] = {
|
||||
|
|
|
|||
|
|
@ -724,9 +724,10 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
|
|||
"verify failure: %s",
|
||||
dns_result_totext(result));
|
||||
}
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_NOTFOUND;
|
||||
return (result);
|
||||
INSIST(result == ISC_R_NOMORE);
|
||||
|
||||
validator_log(val, ISC_LOG_INFO, "no valid signature found");
|
||||
return (DNS_R_NOVALIDSIG);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -865,9 +866,10 @@ nxtvalidate(dns_validator_t *val, isc_boolean_t resume) {
|
|||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
validator_log(val, ISC_LOG_DEBUG(3),
|
||||
"no relevant NXT found");
|
||||
return (result);
|
||||
INSIST(result == ISC_R_NOMORE);
|
||||
|
||||
validator_log(val, ISC_LOG_DEBUG(3), "no relevant NXT found");
|
||||
return (DNS_R_NOVALIDNXT);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
Loading…
Reference in a new issue