2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

2375. [security] Fully randomize UDP query ports to improve

forgery resilience. [RT #17949, #18098]
This commit is contained in:
Tatuya JINMEI 神明達哉
2008-06-23 19:41:20 +00:00
parent 40976ef802
commit 386d3a99c1
26 changed files with 3403 additions and 1553 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: timer.c,v 1.81 2007/10/24 00:57:23 marka Exp $ */
/* $Id: timer.c,v 1.82 2008/06/23 19:41:19 jinmei Exp $ */
/*! \file */
@@ -577,7 +577,7 @@ isc_timer_detach(isc_timer_t **timerp) {
static void
dispatch(isc_timermgr_t *manager, isc_time_t *now) {
isc_boolean_t done = ISC_FALSE, post_event, need_schedule;
isc_event_t *event;
isc_timerevent_t *event;
isc_eventtype_t type = 0;
isc_timer_t *timer;
isc_result_t result;
@@ -650,16 +650,18 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) {
/*
* XXX We could preallocate this event.
*/
event = isc_event_allocate(manager->mctx,
event = (isc_timerevent_t *)isc_event_allocate(manager->mctx,
timer,
type,
timer->action,
timer->arg,
sizeof(*event));
if (event != NULL)
isc_task_send(timer->task, &event);
else
if (event != NULL) {
event->due = timer->due;
isc_task_send(timer->task,
(isc_event_t **)&event);
} else
UNEXPECTED_ERROR(__FILE__, __LINE__,
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_TIMER,