4181. [bug] Queued notify messages could be dequeued from the

wrong rate limiter queue. [RT #40350]

(cherry picked from commit 70862302f8)
This commit is contained in:
Mark Andrews
2015-08-17 10:38:17 +10:00
parent 73dd026d44
commit 8cbf220a1e
2 changed files with 7 additions and 3 deletions
+3
View File
@@ -1,3 +1,6 @@
4181. [bug] Queued notify messages could be dequeued from the
wrong rate limiter queue. [RT #40350]
4179. [bug] Fix double frees in getaddrinfo() in libirs.
[RT #40209]
+4 -3
View File
@@ -10101,8 +10101,6 @@ notify_isqueued(dns_zone_t *zone, unsigned int flags, dns_name_t *name,
notify = ISC_LIST_NEXT(notify, link)) {
if (notify->request != NULL)
continue;
if ((flags & DNS_NOTIFY_STARTUP) == 0)
notify->flags &= ~DNS_NOTIFY_STARTUP;
if (name != NULL && dns_name_dynamic(&notify->ns) &&
dns_name_equal(name, &notify->ns))
goto requeue;
@@ -10118,12 +10116,15 @@ requeue:
* not a startup notify, re-enqueue on the normal notify
* ratelimiter.
*/
if (notify->event != NULL && (flags & DNS_NOTIFY_STARTUP) == 0) {
if (notify->event != NULL && (flags & DNS_NOTIFY_STARTUP) == 0 &&
(notify->flags & DNS_NOTIFY_STARTUP) != 0) {
zmgr = notify->zone->zmgr;
result = isc_ratelimiter_dequeue(zmgr->startupnotifyrl,
notify->event);
if (result != ISC_R_SUCCESS)
return (ISC_TRUE);
notify->flags &= ~DNS_NOTIFY_STARTUP;
result = isc_ratelimiter_enqueue(notify->zone->zmgr->notifyrl,
notify->zone->task,
&notify->event);