version 1.5, 2019/09/05 19:32:58 |
version 1.6, 2019/11/27 05:48:41 |
Line 935 client_resfind(resctx_t *rctx, dns_fetch |
|
Line 935 client_resfind(resctx_t *rctx, dns_fetch |
|
* Otherwise, get some resource for copying the |
* Otherwise, get some resource for copying the |
* result. |
* result. |
*/ |
*/ |
|
dns_name_t *aname = dns_fixedname_name(&rctx->name); |
|
|
ansname = isc_mem_get(mctx, sizeof(*ansname)); |
ansname = isc_mem_get(mctx, sizeof(*ansname)); |
if (ansname == NULL) |
dns_name_init(ansname, NULL); |
tresult = ISC_R_NOMEMORY; |
|
else { |
(void)dns_name_dup(aname, mctx, ansname); |
dns_name_t *aname; |
|
|
|
aname = dns_fixedname_name(&rctx->name); |
|
dns_name_init(ansname, NULL); |
|
tresult = dns_name_dup(aname, mctx, ansname); |
|
if (tresult != ISC_R_SUCCESS) |
|
isc_mem_put(mctx, ansname, |
|
sizeof(*ansname)); |
|
} |
|
if (tresult != ISC_R_SUCCESS) |
|
result = tresult; |
|
} |
} |
|
|
switch (result) { |
switch (result) { |
Line 986 client_resfind(resctx_t *rctx, dns_fetch |
|
Line 977 client_resfind(resctx_t *rctx, dns_fetch |
|
dns_rdata_reset(&rdata); |
dns_rdata_reset(&rdata); |
if (tresult != ISC_R_SUCCESS) |
if (tresult != ISC_R_SUCCESS) |
goto done; |
goto done; |
tresult = dns_name_copy(&cname.cname, name, NULL); |
dns_name_copynf(&cname.cname, name); |
dns_rdata_freestruct(&cname); |
dns_rdata_freestruct(&cname); |
if (tresult == ISC_R_SUCCESS) |
want_restart = true; |
want_restart = true; |
|
else |
|
result = tresult; |
|
goto done; |
goto done; |
case DNS_R_DNAME: |
case DNS_R_DNAME: |
/* |
/* |
Line 1421 dns_client_startresolve(dns_client_t *cl |
|
Line 1409 dns_client_startresolve(dns_client_t *cl |
|
rctx->sigrdataset = sigrdataset; |
rctx->sigrdataset = sigrdataset; |
|
|
dns_fixedname_init(&rctx->name); |
dns_fixedname_init(&rctx->name); |
result = dns_name_copy(name, dns_fixedname_name(&rctx->name), NULL); |
dns_name_copynf(name, dns_fixedname_name(&rctx->name)); |
if (result != ISC_R_SUCCESS) |
|
goto cleanup; |
|
|
|
rctx->client = client; |
rctx->client = client; |
ISC_LINK_INIT(rctx, link); |
ISC_LINK_INIT(rctx, link); |
Line 2237 process_soa(updatectx_t *uctx, dns_rdata |
|
Line 2223 process_soa(updatectx_t *uctx, dns_rdata |
|
|
|
if (uctx->zonename == NULL) { |
if (uctx->zonename == NULL) { |
uctx->zonename = dns_fixedname_name(&uctx->zonefname); |
uctx->zonename = dns_fixedname_name(&uctx->zonefname); |
result = dns_name_copy(soaname, uctx->zonename, NULL); |
dns_name_copynf(soaname, uctx->zonename); |
if (result != ISC_R_SUCCESS) |
|
goto out; |
|
} |
} |
|
|
if (uctx->currentserver != NULL) |
if (uctx->currentserver != NULL) |
Line 2276 process_soa(updatectx_t *uctx, dns_rdata |
|
Line 2260 process_soa(updatectx_t *uctx, dns_rdata |
|
UNLOCK(&uctx->lock); |
UNLOCK(&uctx->lock); |
} |
} |
|
|
out: |
|
dns_rdata_freestruct(&soa); |
dns_rdata_freestruct(&soa); |
|
|
return (result); |
return (result); |
Line 2616 copy_name(isc_mem_t *mctx, dns_message_t |
|
Line 2599 copy_name(isc_mem_t *mctx, dns_message_t |
|
dns_name_init(newname, NULL); |
dns_name_init(newname, NULL); |
dns_name_setbuffer(newname, namebuf); |
dns_name_setbuffer(newname, namebuf); |
dns_message_takebuffer(msg, &namebuf); |
dns_message_takebuffer(msg, &namebuf); |
result = dns_name_copy(name, newname, NULL); |
dns_name_copynf(name, newname); |
if (result != ISC_R_SUCCESS) |
|
goto fail; |
|
|
|
for (rdataset = ISC_LIST_HEAD(name->list); rdataset != NULL; |
for (rdataset = ISC_LIST_HEAD(name->list); rdataset != NULL; |
rdataset = ISC_LIST_NEXT(rdataset, link)) { |
rdataset = ISC_LIST_NEXT(rdataset, link)) { |
Line 2917 dns_client_startupdate(dns_client_t *cli |
|
Line 2898 dns_client_startupdate(dns_client_t *cli |
|
goto fail; |
goto fail; |
if (zonename != NULL) { |
if (zonename != NULL) { |
uctx->zonename = dns_fixedname_name(&uctx->zonefname); |
uctx->zonename = dns_fixedname_name(&uctx->zonefname); |
result = dns_name_copy(zonename, uctx->zonename, NULL); |
dns_name_copynf(zonename, uctx->zonename); |
} |
} |
if (servers != NULL) { |
if (servers != NULL) { |
for (server = ISC_LIST_HEAD(*servers); |
for (server = ISC_LIST_HEAD(*servers); |