2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 15:45:25 +00:00

configuration failed when trusted-keys statement was missing

This commit is contained in:
Andreas Gustafsson
2000-04-11 17:52:57 +00:00
parent e7a8dfd296
commit 864a05fa26

View File

@@ -206,10 +206,10 @@ configure_view_dnsseckeys(dns_c_ctx_t *cctx,
dns_keytable_t *keytable = NULL; dns_keytable_t *keytable = NULL;
dst_key_t *dstkey = NULL; dst_key_t *dstkey = NULL;
CHECK((*cget)(cctx, &ckeys));
CHECK(dns_keytable_create(mctx, &keytable)); CHECK(dns_keytable_create(mctx, &keytable));
result = (*cget)(cctx, &ckeys);
if (result == ISC_R_SUCCESS) {
for (ckey = ISC_LIST_HEAD(ckeys->tkeylist); for (ckey = ISC_LIST_HEAD(ckeys->tkeylist);
ckey != NULL; ckey != NULL;
ckey = ISC_LIST_NEXT(ckey, next)) ckey = ISC_LIST_NEXT(ckey, next))
@@ -226,7 +226,8 @@ configure_view_dnsseckeys(dns_c_ctx_t *cctx,
if (cview == NULL) if (cview == NULL)
viewclass = dns_rdataclass_in; viewclass = dns_rdataclass_in;
else else
CHECK(dns_c_view_getviewclass(cview, &viewclass)); CHECK(dns_c_view_getviewclass(cview,
&viewclass));
keystruct.common.rdclass = viewclass; keystruct.common.rdclass = viewclass;
keystruct.common.rdtype = dns_rdatatype_key; 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, CHECK(dns_rdata_fromstruct(NULL, keystruct.common.rdclass,
keystruct.common.rdtype, keystruct.common.rdtype,
&keystruct, &rrdatabuf)); &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)); CHECK(dns_keytable_add(keytable, &dstkey));
INSIST(dstkey == NULL); INSIST(dstkey == NULL);
} }
} else if (result != ISC_R_NOTFOUND)
goto cleanup;
dns_keytable_detach(target); dns_keytable_detach(target);
*target = keytable; /* Transfer ownership. */ *target = keytable; /* Transfer ownership. */