Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
BIND
Commits
7b9e28f1
Commit
7b9e28f1
authored
Jan 12, 2017
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4552. [bug] Named could trigger a assertion when sending notify
messages. [RT #44019]
parent
434477aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
CHANGES
CHANGES
+3
-0
lib/isc/include/isc/event.h
lib/isc/include/isc/event.h
+3
-1
lib/isc/ratelimiter.c
lib/isc/ratelimiter.c
+6
-6
lib/isc/task.c
lib/isc/task.c
+1
-0
No files found.
CHANGES
View file @
7b9e28f1
4552. [bug] Named could trigger a assertion when sending notify
messages. [RT #44019]
4551. [test] Add system tests for integrity checks of MX and
SRV records. [RT #43953]
...
...
lib/isc/include/isc/event.h
View file @
7b9e28f1
...
...
@@ -32,7 +32,8 @@ typedef void (*isc_eventdestructor_t)(isc_event_t *);
void * ev_sender; \
isc_eventdestructor_t ev_destroy; \
void * ev_destroy_arg; \
ISC_LINK(ltype) ev_link
ISC_LINK(ltype) ev_link; \
ISC_LINK(ltype) ev_ratelink;
/*%
* Attributes matching a mask of 0x000000ff are reserved for the task library's
...
...
@@ -62,6 +63,7 @@ do { \
(event)->ev_destroy = (df); \
(event)->ev_destroy_arg = (da); \
ISC_LINK_INIT((event), ev_link); \
ISC_LINK_INIT((event), ev_ratelink); \
} while (0)
/*%
...
...
lib/isc/ratelimiter.c
View file @
7b9e28f1
...
...
@@ -157,9 +157,9 @@ isc_ratelimiter_enqueue(isc_ratelimiter_t *rl, isc_task_t *task,
ev
->
ev_sender
=
task
;
*
eventp
=
NULL
;
if
(
rl
->
pushpop
)
ISC_LIST_PREPEND
(
rl
->
pending
,
ev
,
ev_link
);
ISC_LIST_PREPEND
(
rl
->
pending
,
ev
,
ev_
rate
link
);
else
ISC_LIST_APPEND
(
rl
->
pending
,
ev
,
ev_link
);
ISC_LIST_APPEND
(
rl
->
pending
,
ev
,
ev_
rate
link
);
}
else
if
(
rl
->
state
==
isc_ratelimiter_idle
)
{
result
=
isc_timer_reset
(
rl
->
timer
,
isc_timertype_ticker
,
NULL
,
&
rl
->
interval
,
ISC_FALSE
);
...
...
@@ -185,8 +185,8 @@ isc_ratelimiter_dequeue(isc_ratelimiter_t *rl, isc_event_t *event) {
REQUIRE
(
event
!=
NULL
);
LOCK
(
&
rl
->
lock
);
if
(
ISC_LINK_LINKED
(
event
,
ev_link
))
{
ISC_LIST_UNLINK
(
rl
->
pending
,
event
,
ev_link
);
if
(
ISC_LINK_LINKED
(
event
,
ev_
rate
link
))
{
ISC_LIST_UNLINK
(
rl
->
pending
,
event
,
ev_
rate
link
);
event
->
ev_sender
=
NULL
;
}
else
result
=
ISC_R_NOTFOUND
;
...
...
@@ -214,7 +214,7 @@ ratelimiter_tick(isc_task_t *task, isc_event_t *event) {
/*
* There is work to do. Let's do it after unlocking.
*/
ISC_LIST_UNLINK
(
rl
->
pending
,
p
,
ev_link
);
ISC_LIST_UNLINK
(
rl
->
pending
,
p
,
ev_
rate
link
);
}
else
{
/*
* No work left to do. Stop the timer so that we don't
...
...
@@ -248,7 +248,7 @@ isc_ratelimiter_shutdown(isc_ratelimiter_t *rl) {
(
void
)
isc_timer_reset
(
rl
->
timer
,
isc_timertype_inactive
,
NULL
,
NULL
,
ISC_FALSE
);
while
((
ev
=
ISC_LIST_HEAD
(
rl
->
pending
))
!=
NULL
)
{
ISC_LIST_UNLINK
(
rl
->
pending
,
ev
,
ev_link
);
ISC_LIST_UNLINK
(
rl
->
pending
,
ev
,
ev_
rate
link
);
ev
->
ev_attributes
|=
ISC_EVENTATTR_CANCELED
;
task
=
ev
->
ev_sender
;
isc_task_send
(
task
,
&
ev
);
...
...
lib/isc/task.c
View file @
7b9e28f1
...
...
@@ -546,6 +546,7 @@ task_send(isc__task_t *task, isc_event_t **eventp) {
REQUIRE
(
event
!=
NULL
);
REQUIRE
(
event
->
ev_type
>
0
);
REQUIRE
(
task
->
state
!=
task_state_done
);
REQUIRE
(
!
ISC_LINK_LINKED
(
event
,
ev_ratelink
));
XTRACE
(
"task_send"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment