mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Merge branch 'ondrej-dns_view-resolver-can-be-NULL' into 'main'
Don't use view->resolver directly when priming in dns_view_find() See merge request isc-projects/bind9!7065
This commit is contained in:
commit
9eaa7e7d37
1 changed files with 12 additions and 4 deletions
|
|
@ -1037,9 +1037,14 @@ db_find:
|
|||
* We just used a hint. Let the resolver know it
|
||||
* should consider priming.
|
||||
*/
|
||||
dns_resolver_prime(view->resolver);
|
||||
dns_db_attach(view->hints, &db);
|
||||
result = DNS_R_HINT;
|
||||
dns_resolver_t *res = NULL;
|
||||
result = dns_view_getresolver(view, &res);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
dns_resolver_prime(res);
|
||||
dns_db_attach(view->hints, &db);
|
||||
dns_resolver_detach(&res);
|
||||
result = DNS_R_HINT;
|
||||
}
|
||||
} else if (result == DNS_R_NXRRSET) {
|
||||
dns_db_attach(view->hints, &db);
|
||||
result = DNS_R_HINTNXRRSET;
|
||||
|
|
@ -1523,7 +1528,10 @@ dns_view_flushcache(dns_view_t *view, bool fixuponly) {
|
|||
dns_badcache_flush(view->failcache);
|
||||
}
|
||||
|
||||
dns_adb_flush(view->adb);
|
||||
if (view->adb) {
|
||||
dns_adb_flush(view->adb);
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue