2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

val->keynode is no longer needed

This commit is contained in:
Mark Andrews
2020-06-11 15:01:12 +10:00
parent e5b2eca1d3
commit ff4fc3f8dc
2 changed files with 2 additions and 24 deletions

View File

@@ -532,7 +532,6 @@ fetch_callback_ds(isc_task_t *task, isc_event_t *event) {
"dsset with trust %s",
dns_trust_totext(rdataset->trust));
val->dsset = &val->frdataset;
INSIST(val->keynode == NULL);
result = validate_dnskey(val);
if (result != DNS_R_WAIT) {
validator_done(val, result);
@@ -1686,7 +1685,6 @@ get_dsset(dns_validator_t *val, dns_name_t *tname, isc_result_t *resp) {
* We have a DS RRset.
*/
val->dsset = &val->frdataset;
INSIST(val->keynode == NULL);
if ((DNS_TRUST_PENDING(val->frdataset.trust) ||
DNS_TRUST_ANSWER(val->frdataset.trust)) &&
dns_rdataset_isassociated(&val->fsigrdataset))
@@ -1782,12 +1780,10 @@ validate_dnskey(dns_validator_t *val) {
result = dns_keytable_find(val->keytable, val->event->name,
&keynode);
if (result == ISC_R_SUCCESS) {
if (!dns_keynode_dsset(keynode, &val->fdsset)) {
dns_keytable_detachkeynode(val->keytable,
&keynode);
} else {
if (dns_keynode_dsset(keynode, &val->fdsset)) {
val->dsset = &val->fdsset;
}
dns_keytable_detachkeynode(val->keytable, &keynode);
}
}
@@ -1818,14 +1814,6 @@ validate_dnskey(dns_validator_t *val) {
*/
result = get_dsset(val, val->event->name, &tresult);
if (result == ISC_R_COMPLETE) {
if (tresult == DNS_R_WAIT) {
/*
* Keep the keynode attached so we don't
* lose val->dsset.
*/
val->keynode = keynode;
}
result = tresult;
goto cleanup;
}
@@ -1837,7 +1825,6 @@ validate_dnskey(dns_validator_t *val) {
INSIST(val->dsset != NULL);
if (val->dsset->trust < dns_trust_secure) {
INSIST(keynode == NULL);
result = markanswer(val, "validate_dnskey (2)", "insecure DS");
goto cleanup;
}
@@ -1958,10 +1945,6 @@ cleanup:
val->dsset = NULL;
dns_rdataset_disassociate(&val->fdsset);
}
if (keynode != NULL) {
val->dsset = NULL;
dns_keytable_detachkeynode(val->keytable, &keynode);
}
return (result);
}
@@ -3215,10 +3198,6 @@ destroy(dns_validator_t *val) {
dst_key_free(&val->key);
}
if (val->keytable != NULL) {
if (val->keynode != NULL) {
dns_keytable_detachkeynode(val->keytable,
&val->keynode);
}
dns_keytable_detach(&val->keytable);
}
if (val->subvalidator != NULL) {