mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
fix: usr: Fix a crash when reconfiguring while an NTA is being rechecked
When named was reconfigured or shut down while a negative trust anchor was being rechecked against authoritative servers, the in-flight recheck could outlive the view that owned it and cause `named` to crash. This has been fixed. Closes #5938 Merge branch '5938-ref-ntatable' into 'main' See merge request isc-projects/bind9!11948
This commit is contained in:
commit
386177ec67
1 changed files with 2 additions and 1 deletions
|
|
@ -89,6 +89,7 @@ dns__nta_destroy(dns__nta_t *nta) {
|
|||
REQUIRE(nta->timer == NULL);
|
||||
|
||||
nta->magic = 0;
|
||||
dns_ntatable_detach(&nta->ntatable);
|
||||
dns_rdataset_cleanup(&nta->rdataset);
|
||||
dns_rdataset_cleanup(&nta->sigrdataset);
|
||||
if (nta->fetch != NULL) {
|
||||
|
|
@ -265,7 +266,7 @@ nta_create(dns_ntatable_t *ntatable, const dns_name_t *name,
|
|||
|
||||
nta = isc_mem_get(ntatable->mctx, sizeof(dns__nta_t));
|
||||
*nta = (dns__nta_t){
|
||||
.ntatable = ntatable,
|
||||
.ntatable = dns_ntatable_ref(ntatable),
|
||||
.name = DNS_NAME_INITEMPTY,
|
||||
.magic = NTA_MAGIC,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue