mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 07:35:26 +00:00
4833. [bug] isc_event_free should check that the event is not
linked when called. [RT #46725] 4832. [bug] Events were not being removed from zone->rss_events. [RT #46725]
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -1,3 +1,9 @@
|
|||||||
|
4833. [bug] isc_event_free should check that the event is not
|
||||||
|
linked when called. [RT #46725]
|
||||||
|
|
||||||
|
4832. [bug] Events were not being removed from zone->rss_events.
|
||||||
|
[RT #46725]
|
||||||
|
|
||||||
4831. [bug] Convert the RRSIG expirytime to 64 bits for
|
4831. [bug] Convert the RRSIG expirytime to 64 bits for
|
||||||
comparisions in diff.c:resign. [RT #46710]
|
comparisions in diff.c:resign. [RT #46710]
|
||||||
|
|
||||||
|
@@ -1555,6 +1555,8 @@ dns_rpz_new_zone(dns_rpz_zones_t *rpzs, dns_rpz_zone_t **rpzp) {
|
|||||||
zone->updbit = NULL;
|
zone->updbit = NULL;
|
||||||
zone->rpzs = rpzs;
|
zone->rpzs = rpzs;
|
||||||
zone->db_registered = ISC_FALSE;
|
zone->db_registered = ISC_FALSE;
|
||||||
|
ISC_EVENT_INIT(&zone->updateevent, sizeof(zone->updateevent),
|
||||||
|
0, NULL, 0, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
zone->num = rpzs->p.num_zones++;
|
zone->num = rpzs->p.num_zones++;
|
||||||
rpzs->zones[zone->num] = zone;
|
rpzs->zones[zone->num] = zone;
|
||||||
@@ -1633,6 +1635,7 @@ dns_rpz_dbupdate_callback(dns_db_t *db, void *fn_arg) {
|
|||||||
isc_event_t *event;
|
isc_event_t *event;
|
||||||
|
|
||||||
dns_db_currentversion(zone->db, &zone->dbversion);
|
dns_db_currentversion(zone->db, &zone->dbversion);
|
||||||
|
INSIST(!ISC_LINK_LINKED(&zone->updateevent, ev_link));
|
||||||
ISC_EVENT_INIT(&zone->updateevent,
|
ISC_EVENT_INIT(&zone->updateevent,
|
||||||
sizeof(zone->updateevent), 0, NULL,
|
sizeof(zone->updateevent), 0, NULL,
|
||||||
DNS_EVENT_RPZUPDATED,
|
DNS_EVENT_RPZUPDATED,
|
||||||
@@ -1669,6 +1672,7 @@ dns_rpz_update_taskaction(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
UNUSED(task);
|
UNUSED(task);
|
||||||
zone = (dns_rpz_zone_t *) event->ev_arg;
|
zone = (dns_rpz_zone_t *) event->ev_arg;
|
||||||
|
isc_event_free(&event);
|
||||||
LOCK(&zone->rpzs->maint_lock);
|
LOCK(&zone->rpzs->maint_lock);
|
||||||
zone->updatepending = ISC_FALSE;
|
zone->updatepending = ISC_FALSE;
|
||||||
zone->updaterunning = ISC_TRUE;
|
zone->updaterunning = ISC_TRUE;
|
||||||
@@ -1679,7 +1683,6 @@ dns_rpz_update_taskaction(isc_task_t *task, isc_event_t *event) {
|
|||||||
result = isc_time_now(&zone->lastupdated);
|
result = isc_time_now(&zone->lastupdated);
|
||||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||||
UNLOCK(&zone->rpzs->maint_lock);
|
UNLOCK(&zone->rpzs->maint_lock);
|
||||||
isc_event_free(&event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
@@ -1943,6 +1946,7 @@ update_quantum(isc_task_t *task, isc_event_t *event) {
|
|||||||
/*
|
/*
|
||||||
* We finished a quantum; trigger the next one and return
|
* We finished a quantum; trigger the next one and return
|
||||||
*/
|
*/
|
||||||
|
INSIST(!ISC_LINK_LINKED(&rpz->updateevent, ev_link));
|
||||||
ISC_EVENT_INIT(&rpz->updateevent,
|
ISC_EVENT_INIT(&rpz->updateevent,
|
||||||
sizeof(rpz->updateevent), 0, NULL,
|
sizeof(rpz->updateevent), 0, NULL,
|
||||||
DNS_EVENT_RPZUPDATED,
|
DNS_EVENT_RPZUPDATED,
|
||||||
@@ -1995,6 +1999,7 @@ dns_rpz_update_from_db(dns_rpz_zone_t *rpz) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
event = &rpz->updateevent;
|
event = &rpz->updateevent;
|
||||||
|
INSIST(!ISC_LINK_LINKED(&rpz->updateevent, ev_link));
|
||||||
ISC_EVENT_INIT(&rpz->updateevent, sizeof(rpz->updateevent),
|
ISC_EVENT_INIT(&rpz->updateevent, sizeof(rpz->updateevent),
|
||||||
0, NULL, DNS_EVENT_RPZUPDATED,
|
0, NULL, DNS_EVENT_RPZUPDATED,
|
||||||
update_quantum, rpz, rpz, NULL, NULL);
|
update_quantum, rpz, rpz, NULL, NULL);
|
||||||
|
@@ -14360,6 +14360,7 @@ receive_secure_serial(isc_task_t *task, isc_event_t *event) {
|
|||||||
LOCK_ZONE(zone);
|
LOCK_ZONE(zone);
|
||||||
INSIST(zone->irefs > 1);
|
INSIST(zone->irefs > 1);
|
||||||
zone->irefs--;
|
zone->irefs--;
|
||||||
|
ISC_LIST_UNLINK(zone->rss_events, event, ev_link);
|
||||||
goto nextevent;
|
goto nextevent;
|
||||||
}
|
}
|
||||||
dns_zone_idetach(&zone);
|
dns_zone_idetach(&zone);
|
||||||
|
@@ -91,6 +91,9 @@ isc_event_free(isc_event_t **eventp) {
|
|||||||
event = *eventp;
|
event = *eventp;
|
||||||
REQUIRE(event != NULL);
|
REQUIRE(event != NULL);
|
||||||
|
|
||||||
|
REQUIRE(!ISC_LINK_LINKED(event, ev_link));
|
||||||
|
REQUIRE(!ISC_LINK_LINKED(event, ev_ratelink));
|
||||||
|
|
||||||
if (event->ev_destroy != NULL)
|
if (event->ev_destroy != NULL)
|
||||||
(event->ev_destroy)(event);
|
(event->ev_destroy)(event);
|
||||||
|
|
||||||
|
@@ -703,6 +703,7 @@ isc__task_purgerange(isc_task_t *task0, void *sender, isc_eventtype_t first,
|
|||||||
|
|
||||||
for (event = HEAD(events); event != NULL; event = next_event) {
|
for (event = HEAD(events); event != NULL; event = next_event) {
|
||||||
next_event = NEXT(event, ev_link);
|
next_event = NEXT(event, ev_link);
|
||||||
|
ISC_LIST_UNLINK(events, event, ev_link);
|
||||||
isc_event_free(&event);
|
isc_event_free(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user