mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
Run the forward_cancel on the appropriate zone->loop
If the zone forwards are canceled from dns_zonemgr_shutdown(), the forward_cancel() would get called from the main loop, which is wrong. It needs to be called from the matching zone->loop. Run the dns_request_cancel() via isc_async_run() on the loop associated with the zone instead of calling the dns_request_cancel() directly from the main loop.
This commit is contained in:
parent
36a3c87c33
commit
3df3b5efbd
@ -11845,6 +11845,13 @@ checkds_cancel(dns_zone_t *zone) {
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
forward_cancel_cb(void *arg) {
|
||||
dns_request_t *request = arg;
|
||||
dns_request_cancel(request);
|
||||
dns_request_detach(&request);
|
||||
}
|
||||
|
||||
static void
|
||||
forward_cancel(dns_zone_t *zone) {
|
||||
dns_forward_t *forward;
|
||||
@ -11859,7 +11866,9 @@ forward_cancel(dns_zone_t *zone) {
|
||||
forward = ISC_LIST_NEXT(forward, link))
|
||||
{
|
||||
if (forward->request != NULL) {
|
||||
dns_request_cancel(forward->request);
|
||||
dns_request_t *request = NULL;
|
||||
dns_request_attach(forward->request, &request);
|
||||
isc_async_run(zone->loop, forward_cancel_cb, request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user