mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 07:35:26 +00:00
configuration failed when trusted-keys statement was missing
This commit is contained in:
@@ -206,10 +206,10 @@ configure_view_dnsseckeys(dns_c_ctx_t *cctx,
|
||||
dns_keytable_t *keytable = NULL;
|
||||
dst_key_t *dstkey = NULL;
|
||||
|
||||
CHECK((*cget)(cctx, &ckeys));
|
||||
|
||||
CHECK(dns_keytable_create(mctx, &keytable));
|
||||
|
||||
result = (*cget)(cctx, &ckeys);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
for (ckey = ISC_LIST_HEAD(ckeys->tkeylist);
|
||||
ckey != NULL;
|
||||
ckey = ISC_LIST_NEXT(ckey, next))
|
||||
@@ -226,7 +226,8 @@ configure_view_dnsseckeys(dns_c_ctx_t *cctx,
|
||||
if (cview == NULL)
|
||||
viewclass = dns_rdataclass_in;
|
||||
else
|
||||
CHECK(dns_c_view_getviewclass(cview, &viewclass));
|
||||
CHECK(dns_c_view_getviewclass(cview,
|
||||
&viewclass));
|
||||
keystruct.common.rdclass = viewclass;
|
||||
keystruct.common.rdtype = dns_rdatatype_key;
|
||||
/*
|
||||
@@ -265,11 +266,14 @@ configure_view_dnsseckeys(dns_c_ctx_t *cctx,
|
||||
CHECK(dns_rdata_fromstruct(NULL, keystruct.common.rdclass,
|
||||
keystruct.common.rdtype,
|
||||
&keystruct, &rrdatabuf));
|
||||
CHECK(dst_key_fromdns(ckey->domain, &rrdatabuf, mctx, &dstkey));
|
||||
CHECK(dst_key_fromdns(ckey->domain, &rrdatabuf, mctx,
|
||||
&dstkey));
|
||||
|
||||
CHECK(dns_keytable_add(keytable, &dstkey));
|
||||
INSIST(dstkey == NULL);
|
||||
}
|
||||
} else if (result != ISC_R_NOTFOUND)
|
||||
goto cleanup;
|
||||
|
||||
dns_keytable_detach(target);
|
||||
*target = keytable; /* Transfer ownership. */
|
||||
|
Reference in New Issue
Block a user