From: Arran Cudbard-Bell Date: Wed, 8 Sep 2021 23:29:07 +0000 (-0500) Subject: Remove request->el X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c5db9c66e8ee3502ea9afb773df818c126e55dc;p=thirdparty%2Ffreeradius-server.git Remove request->el We now use the one associated with the interpreter. Requests don't have event lists... interpreters do. There were some instances where request->el wasn't being inherited correctly, this fixes that. --- diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index 933f483f1bf..7c592408317 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -124,8 +124,7 @@ static RADCLIENT *client_alloc(TALLOC_CTX *ctx, char const *ip, char const *name return client; } -static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, RADCLIENT *client, - CONF_SECTION *server_cs, fr_event_list_t *el) +static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, RADCLIENT *client, CONF_SECTION *server_cs) { fr_pair_t *vp; request_t *request; @@ -165,7 +164,6 @@ static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, RADCLIENT *client request->client = client; request->number = number++; request->name = talloc_typed_asprintf(request, "%" PRIu64, request->number); - request->el = el; request->master_state = REQUEST_ACTIVE; /* @@ -832,7 +830,7 @@ int main(int argc, char *argv[]) /* * Grab the VPs from stdin, or from the file. */ - request = request_from_file(autofree, fp, client, server_cs, el); + request = request_from_file(autofree, fp, client, server_cs); if (!request) { fr_perror("Failed reading input from %s", input_file); EXIT_WITH_FAILURE; @@ -886,7 +884,7 @@ int main(int argc, char *argv[]) } if (count == 1) { - unlang_interpret_synchronous(request); + unlang_interpret_synchronous(el, request); } else { int i; request_t *old = request_clone(request); @@ -894,7 +892,7 @@ int main(int argc, char *argv[]) for (i = 0; i < count; i++) { request = request_clone(old); - unlang_interpret_synchronous(request); + unlang_interpret_synchronous(el, request); talloc_free(request); } } diff --git a/src/lib/io/worker.c b/src/lib/io/worker.c index 806824ca0cf..9331395d956 100644 --- a/src/lib/io/worker.c +++ b/src/lib/io/worker.c @@ -642,8 +642,6 @@ static char *itoa_internal(TALLOC_CTX *ctx, uint64_t number) static inline CC_HINT(always_inline) void worker_request_init(fr_worker_t *worker, request_t *request, fr_time_t now) { - request->el = worker->el; - /* * For internal requests request->packet * and request->reply are already populated. diff --git a/src/lib/server/exec.c b/src/lib/server/exec.c index efa5ac4c5a5..1abe27a3548 100644 --- a/src/lib/server/exec.c +++ b/src/lib/server/exec.c @@ -340,7 +340,7 @@ int fr_exec_fork_nowait(request_t *request, fr_value_box_list_t *vb_list, fr_pai * Ensure that we can clean up any child processes. We * don't want them left over as zombies. */ - if (fr_event_pid_reap(request->el, pid, NULL, NULL) < 0) { + if (fr_event_pid_reap(unlang_interpret_event_list(request), pid, NULL, NULL) < 0) { int status; /* @@ -517,6 +517,7 @@ int fr_exec_fork_wait(pid_t *pid_p, int *stdin_fd, int *stdout_fd, int *stderr_f void fr_exec_cleanup(fr_exec_state_t *exec, int signal) { request_t *request = exec->request; + fr_event_list_t *el = unlang_interpret_event_list(request); if (exec->pid) RDEBUG3("Cleaning up exec state for pid %u", exec->pid); @@ -530,7 +531,7 @@ void fr_exec_cleanup(fr_exec_state_t *exec, int signal) } if (exec->stdout_fd >= 0) { - if (fr_event_fd_delete(request->el, exec->stdout_fd, FR_EVENT_FILTER_IO) < 0){ + if (fr_event_fd_delete(el, exec->stdout_fd, FR_EVENT_FILTER_IO) < 0){ RPERROR("Failed removing stdout handler"); } close(exec->stdout_fd); @@ -538,7 +539,7 @@ void fr_exec_cleanup(fr_exec_state_t *exec, int signal) } if (exec->stderr_fd >= 0) { - if (fr_event_fd_delete(request->el, exec->stderr_fd, FR_EVENT_FILTER_IO) < 0) { + if (fr_event_fd_delete(el, exec->stderr_fd, FR_EVENT_FILTER_IO) < 0) { RPERROR("Failed removing stderr handler"); } close(exec->stderr_fd); @@ -548,7 +549,7 @@ void fr_exec_cleanup(fr_exec_state_t *exec, int signal) if (exec->pid >= 0) { if (signal > 0) kill(exec->pid, signal); - if (unlikely(fr_event_pid_reap(request->el, exec->pid, NULL, NULL) < 0)) { + if (unlikely(fr_event_pid_reap(el, exec->pid, NULL, NULL) < 0)) { int status; RPERROR("Failed setting up async PID reaper, PID %u may now be a zombie", exec->pid); @@ -766,7 +767,7 @@ static void exec_stdout_read(UNUSED fr_event_list_t *el, int fd, int flags, void * We've received EOF - so the process has finished writing * Remove event and tidy up */ - (void) fr_event_fd_delete(exec->request->el, fd, FR_EVENT_FILTER_IO); + (void) fr_event_fd_delete(unlang_interpret_event_list(exec->request), fd, FR_EVENT_FILTER_IO); close(fd); exec->stdout_fd = -1; @@ -819,7 +820,8 @@ int fr_exec_start(TALLOC_CTX *ctx, fr_exec_state_t *exec, request_t *request, bool store_stdout, TALLOC_CTX *stdout_ctx, fr_time_delta_t timeout) { - int *stdout_fd = (store_stdout || RDEBUG_ENABLED2) ? &exec->stdout_fd : NULL; + int *stdout_fd = (store_stdout || RDEBUG_ENABLED2) ? &exec->stdout_fd : NULL; + fr_event_list_t *el = unlang_interpret_event_list(request); *exec = (fr_exec_state_t){ .request = request, @@ -853,7 +855,7 @@ int fr_exec_start(TALLOC_CTX *ctx, fr_exec_state_t *exec, request_t *request, /* * Tell the event loop that it needs to wait for this PID */ - if (fr_event_pid_wait(ctx, request->el, &exec->ev_pid, exec->pid, exec_reap, exec) < 0) { + if (fr_event_pid_wait(ctx, el, &exec->ev_pid, exec->pid, exec_reap, exec) < 0) { exec->pid = -1; RPEDEBUG("Failed adding watcher for child process"); @@ -879,7 +881,7 @@ int fr_exec_start(TALLOC_CTX *ctx, fr_exec_state_t *exec, request_t *request, /* * Setup event to kill the child process after a period of time. */ - if ((timeout > 0) && fr_event_timer_in(ctx, request->el, &exec->ev, + if ((timeout > 0) && fr_event_timer_in(ctx, el, &exec->ev, timeout, exec_timeout, exec) < 0) goto fail_and_close; /* @@ -891,7 +893,7 @@ int fr_exec_start(TALLOC_CTX *ctx, fr_exec_state_t *exec, request_t *request, * Accept a maximum of 32k of data from the process. */ fr_sbuff_init_talloc(exec->stdout_ctx, &exec->stdout_buff, &exec->stdout_tctx, 128, 32 * 1024); - if (fr_event_fd_insert(ctx, request->el, exec->stdout_fd, exec_stdout_read, NULL, NULL, exec) < 0) { + if (fr_event_fd_insert(ctx, el, exec->stdout_fd, exec_stdout_read, NULL, NULL, exec) < 0) { RPEDEBUG("Failed adding event listening to stdout"); goto fail_and_close; } @@ -909,7 +911,7 @@ int fr_exec_start(TALLOC_CTX *ctx, fr_exec_state_t *exec, request_t *request, .prefix = exec->stdout_prefix }; - if (fr_event_fd_insert(ctx, request->el, exec->stdout_fd, log_request_fd_event, + if (fr_event_fd_insert(ctx, el, exec->stdout_fd, log_request_fd_event, NULL, NULL, &exec->stdout_uctx) < 0){ RPEDEBUG("Failed adding event listening to stdout"); goto fail_and_close; @@ -927,7 +929,7 @@ int fr_exec_start(TALLOC_CTX *ctx, fr_exec_state_t *exec, request_t *request, .prefix = exec->stderr_prefix }; - if (fr_event_fd_insert(ctx, request->el, exec->stderr_fd, log_request_fd_event, + if (fr_event_fd_insert(ctx, el, exec->stderr_fd, log_request_fd_event, NULL, NULL, &exec->stderr_uctx) < 0) { RPEDEBUG("Failed adding event listening to stderr"); close(exec->stderr_fd); diff --git a/src/lib/server/exec_legacy.c b/src/lib/server/exec_legacy.c index ce5069848d3..16e5b0af5ec 100644 --- a/src/lib/server/exec_legacy.c +++ b/src/lib/server/exec_legacy.c @@ -360,7 +360,9 @@ pid_t radius_start_program_legacy(int *stdin_fd, int *stdout_fd, int *stderr_fd, close(stderr_pipe[1]); } } else { - (void) fr_event_pid_wait(request->el, request->el, NULL, pid, NULL, NULL); + fr_event_list_t *el = unlang_interpret_event_list(request); + + (void) fr_event_pid_wait(el, el, NULL, pid, NULL, NULL); } return pid; diff --git a/src/lib/server/request.h b/src/lib/server/request.h index 4f05fa079d1..952fac03f58 100644 --- a/src/lib/server/request.h +++ b/src/lib/server/request.h @@ -211,8 +211,6 @@ struct request_s { fr_radius_packet_t *packet; //!< Incoming request. fr_radius_packet_t *reply; //!< Outgoing response. - fr_event_list_t *el; //!< thread-specific event list. - RADCLIENT *client; //!< The client that originally sent us the request. request_master_state_t master_state; //!< Set by the master thread to signal the child that's currently diff --git a/src/lib/server/trigger.c b/src/lib/server/trigger.c index 49097417f3d..6e4cc33db5b 100644 --- a/src/lib/server/trigger.c +++ b/src/lib/server/trigger.c @@ -458,7 +458,7 @@ int trigger_exec(unlang_interpret_t *intp, request_t *request, * with something like the server * shutting down. */ - unlang_interpret_synchronous(child); + unlang_interpret_synchronous(unlang_interpret_event_list(request), child); talloc_free(child); } diff --git a/src/lib/server/virtual_servers.c b/src/lib/server/virtual_servers.c index a6b0f305bb0..b5ef5da84d2 100644 --- a/src/lib/server/virtual_servers.c +++ b/src/lib/server/virtual_servers.c @@ -1279,7 +1279,7 @@ unlang_action_t process_authenticate(rlm_rcode_t *p_result, int auth_type, reque if (unlang_interpret_push_section(request, subcs, RLM_MODULE_REJECT, UNLANG_TOP_FRAME) < 0) { RETURN_MODULE_FAIL; } - rcode = unlang_interpret_synchronous(request); + rcode = unlang_interpret_synchronous(unlang_interpret_event_list(request), request); request->component = component; request->module = module; diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 4a2ba02e849..70f814e8938 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -285,7 +285,7 @@ unlang_frame_action_t result_calculate(request_t *request, unlang_stack_frame_t if (instruction->actions.retry.mrd) { retry->timeout = fr_time() + instruction->actions.retry.mrd; - if (fr_event_timer_at(retry, request->el, &retry->ev, retry->timeout, + if (fr_event_timer_at(retry, unlang_interpret_event_list(request), &retry->ev, retry->timeout, instruction_timeout_handler, request) < 0) { RPEDEBUG("Failed inserting event"); goto fail; @@ -1411,6 +1411,18 @@ unlang_interpret_t *unlang_interpret_get(request_t *request) return stack->intp; } +/** Get the event list for the current interpreter + * + */ +fr_event_list_t *unlang_interpret_event_list(request_t *request) +{ + unlang_stack_t *stack = request->stack; + + if (!stack->intp) return NULL; + + return stack->intp->el; +} + /** Set the default interpreter for this thread * */ diff --git a/src/lib/unlang/interpret.h b/src/lib/unlang/interpret.h index 43c682d9d07..17f3849ff33 100644 --- a/src/lib/unlang/interpret.h +++ b/src/lib/unlang/interpret.h @@ -135,13 +135,15 @@ void unlang_interpret_set(request_t *request, unlang_interpret_t *intp); unlang_interpret_t *unlang_interpret_get(request_t *request); +fr_event_list_t *unlang_interpret_event_list(request_t *request); + void unlang_interpret_set_thread_default(unlang_interpret_t *intp); unlang_interpret_t *unlang_interpret_get_thread_default(void); rlm_rcode_t unlang_interpret(request_t *request) CC_HINT(hot); -rlm_rcode_t unlang_interpret_synchronous(request_t *request); +rlm_rcode_t unlang_interpret_synchronous(fr_event_list_t *el, request_t *request); void *unlang_interpret_stack_alloc(TALLOC_CTX *ctx); diff --git a/src/lib/unlang/interpret_synchronous.c b/src/lib/unlang/interpret_synchronous.c index d6b1d327db7..08241570233 100644 --- a/src/lib/unlang/interpret_synchronous.c +++ b/src/lib/unlang/interpret_synchronous.c @@ -183,9 +183,8 @@ static unlang_interpret_synchronous_t *unlang_interpret_synchronous_alloc(TALLOC * @param[in] request The current request. * @return One of the RLM_MODULE_* macros. */ -rlm_rcode_t unlang_interpret_synchronous(request_t *request) +rlm_rcode_t unlang_interpret_synchronous(fr_event_list_t *el, request_t *request) { - fr_event_list_t *old_el; unlang_interpret_t *old_intp; char const *caller; @@ -197,12 +196,10 @@ rlm_rcode_t unlang_interpret_synchronous(request_t *request) bool dont_wait_for_event; int iterations = 0; - old_el = request->el; old_intp = unlang_interpret_get(request); caller = request->module; - intps = unlang_interpret_synchronous_alloc(request, request->el); - request->el = intps->el; + intps = unlang_interpret_synchronous_alloc(request, el); unlang_interpret_set(request, intps->intp); rcode = unlang_interpret(request); @@ -219,7 +216,7 @@ rlm_rcode_t unlang_interpret_synchronous(request_t *request) * well. */ DEBUG3("Gathering events - %s", dont_wait_for_event ? "Will not wait" : "will wait"); - num_events = fr_event_corral(request->el, fr_time(), !dont_wait_for_event); + num_events = fr_event_corral(el, fr_time(), !dont_wait_for_event); if (num_events < 0) { RPERROR("fr_event_corral"); break; @@ -235,7 +232,7 @@ rlm_rcode_t unlang_interpret_synchronous(request_t *request) */ if (num_events > 0) { DEBUG4("Servicing event(s)"); - fr_event_service(request->el); + fr_event_service(el); } /* @@ -280,7 +277,6 @@ rlm_rcode_t unlang_interpret_synchronous(request_t *request) talloc_free(intps); unlang_interpret_set(request, old_intp); - request->el = old_el; request->module = caller; return rcode; diff --git a/src/lib/unlang/io.c b/src/lib/unlang/io.c index cd8bdb6a17f..7af6079cb67 100644 --- a/src/lib/unlang/io.c +++ b/src/lib/unlang/io.c @@ -62,7 +62,6 @@ request_t *unlang_io_subrequest_alloc(request_t *parent, fr_dict_t const *namesp * Initialize some basic information for the child. */ child->number = parent->number; - child->el = parent->el; /* * Initialize all of the async fields. diff --git a/src/lib/unlang/module.c b/src/lib/unlang/module.c index 90bfd14b092..a6205f58ba4 100644 --- a/src/lib/unlang/module.c +++ b/src/lib/unlang/module.c @@ -93,9 +93,8 @@ static int _unlang_event_free(unlang_module_event_t *ev) } if (ev->fd >= 0) { - if (!ev->request || !ev->request->el) return 0; - - (void) fr_event_fd_delete(ev->request->el, ev->fd, FR_EVENT_FILTER_IO); + if (!ev->request) return 0; + (void) fr_event_fd_delete(unlang_interpret_event_list(ev->request), ev->fd, FR_EVENT_FILTER_IO); } return 0; @@ -162,7 +161,7 @@ int unlang_module_timeout_add(request_t *request, unlang_module_timeout_t callba .ctx = ctx }; - if (fr_event_timer_at(request, request->el, &ev->ev, + if (fr_event_timer_at(request, unlang_interpret_event_list(request), &ev->ev, when, unlang_module_event_timeout_handler, ev) < 0) { RPEDEBUG("Failed inserting event"); talloc_free(ev); @@ -297,7 +296,7 @@ int unlang_module_fd_add(request_t *request, /* * Register for events on the file descriptor */ - if (fr_event_fd_insert(request, request->el, fd, + if (fr_event_fd_insert(request, unlang_interpret_event_list(request), fd, ev->fd_read ? unlang_event_fd_read_handler : NULL, ev->fd_write ? unlang_event_fd_write_handler : NULL, ev->fd_error ? unlang_event_fd_error_handler: NULL, @@ -874,7 +873,7 @@ static void unlang_module_event_retry_handler(UNUSED fr_event_list_t *el, fr_tim /* * Reset the timer. */ - if (fr_event_timer_at(request, request->el, &state->ev, state->retry.next, + if (fr_event_timer_at(request, unlang_interpret_event_list(request), &state->ev, state->retry.next, unlang_module_event_retry_handler, request) < 0) { RPEDEBUG("Failed inserting event"); unlang_interpret_mark_runnable(request); /* and let the caller figure out what's up */ @@ -1000,7 +999,8 @@ static unlang_action_t unlang_module(rlm_rcode_t *p_result, request_t *request, (void) fr_retry_init(&state->retry, now, &frame->instruction->actions.retry); /* can't fail */ - if (fr_event_timer_at(request, request->el, &state->ev, state->retry.next, + if (fr_event_timer_at(request, unlang_interpret_event_list(request), + &state->ev, state->retry.next, unlang_module_event_retry_handler, request) < 0) { RPEDEBUG("Failed inserting event"); goto fail; diff --git a/src/lib/unlang/subrequest_child.c b/src/lib/unlang/subrequest_child.c index bc87d93fcf0..8eee8ef28be 100644 --- a/src/lib/unlang/subrequest_child.c +++ b/src/lib/unlang/subrequest_child.c @@ -110,7 +110,7 @@ int unlang_subrequest_lifetime_set(request_t *request) ev_p = talloc_size(request, sizeof(*ev_p)); memset(ev_p, 0, sizeof(*ev_p)); - if (fr_event_timer_in(request, request->el, ev_p, when, + if (fr_event_timer_in(request, unlang_interpret_event_list(request), ev_p, when, unlang_detached_max_request_time, request) < 0) { talloc_free(ev_p); return -1; diff --git a/src/lib/unlang/xlat.c b/src/lib/unlang/xlat.c index 6c590920482..b9e3efc16fe 100644 --- a/src/lib/unlang/xlat.c +++ b/src/lib/unlang/xlat.c @@ -108,7 +108,7 @@ static int _unlang_xlat_event_free(unlang_xlat_event_t *ev) } if (ev->fd >= 0) { - (void) fr_event_fd_delete(ev->request->el, ev->fd, FR_EVENT_FILTER_IO); + (void) fr_event_fd_delete(unlang_interpret_event_list(ev->request), ev->fd, FR_EVENT_FILTER_IO); } return 0; @@ -172,7 +172,8 @@ int unlang_xlat_event_timeout_add(request_t *request, fr_unlang_xlat_timeout_t c ev->thread = xlat_thread_instance_find(state->exp); ev->ctx = ctx; - if (fr_event_timer_at(request, request->el, &ev->ev, when, unlang_xlat_event_timeout_handler, ev) < 0) { + if (fr_event_timer_at(request, unlang_interpret_event_list(request), + &ev->ev, when, unlang_xlat_event_timeout_handler, ev) < 0) { RPEDEBUG("Failed inserting event"); talloc_free(ev); return -1; diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index 10eac2e4273..8a2a2435deb 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -1576,7 +1576,7 @@ static char *xlat_sync_eval(TALLOC_CTX *ctx, request_t *request, xlat_exp_t cons return NULL; } - switch (unlang_interpret_synchronous(request)) { + switch (unlang_interpret_synchronous(unlang_interpret_event_list(request), request)) { default: break; diff --git a/src/modules/proto_bfd/proto_bfd.c b/src/modules/proto_bfd/proto_bfd.c index c8689426c62..0fb883e2512 100644 --- a/src/modules/proto_bfd/proto_bfd.c +++ b/src/modules/proto_bfd/proto_bfd.c @@ -1372,7 +1372,7 @@ static int bfd_process(bfd_state_t *session, bfd_packet_t *bfd) talloc_free(request); return 0; } - unlang_interpret_synchronous(request); + unlang_interpret_synchronous(unlang_interpret_event_list(request), request); DEBUG("}"); /* diff --git a/src/modules/proto_ldap_sync/proto_ldap_sync.c b/src/modules/proto_ldap_sync/proto_ldap_sync.c index 5a182117d31..48e90d5d9dc 100644 --- a/src/modules/proto_ldap_sync/proto_ldap_sync.c +++ b/src/modules/proto_ldap_sync/proto_ldap_sync.c @@ -421,7 +421,7 @@ static void request_running(request_t *request, fr_state_signal_t action) FALL_THROUGH; case REQUEST_RECV: - rcode = unlang_interpret_synchronous(request); + rcode = unlang_interpret_synchronous(unlang_interpret_event_list(request), request); if (request->master_state == REQUEST_STOP_PROCESSING) goto done; FALL_THROUGH; @@ -836,7 +836,7 @@ static int proto_ldap_cookie_load(TALLOC_CTX *ctx, uint8_t **cookie, rad_listen_ ret = -1; goto finish; } - rcode = unlang_interpret_synchronous(request); + rcode = unlang_interpret_synchronous(unlang_interpret_event_list(request), request); switch (rcode) { case RLM_MODULE_OK: case RLM_MODULE_UPDATED: diff --git a/src/modules/rlm_eap/types/rlm_eap_gtc/rlm_eap_gtc.c b/src/modules/rlm_eap/types/rlm_eap_gtc/rlm_eap_gtc.c index eee8d1b82e1..26a8b2aa7e3 100644 --- a/src/modules/rlm_eap/types/rlm_eap_gtc/rlm_eap_gtc.c +++ b/src/modules/rlm_eap/types/rlm_eap_gtc/rlm_eap_gtc.c @@ -105,7 +105,7 @@ static unlang_action_t mod_process_auth_type(rlm_rcode_t *p_result, UNUSED modul eap_session_t *eap_session = eap_session_get(request->parent); eap_round_t *eap_round = eap_session->this_round; - rcode = unlang_interpret_synchronous(request); + rcode = unlang_interpret_synchronous(unlang_interpret_event_list(request), request); if (request->master_state == REQUEST_STOP_PROCESSING) return UNLANG_ACTION_STOP_PROCESSING; diff --git a/src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c b/src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c index 9903d14f102..6829dd1edf6 100644 --- a/src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c +++ b/src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c @@ -433,7 +433,7 @@ static unlang_action_t mod_process_auth_type(rlm_rcode_t *p_result, module_ctx_t rlm_rcode_t rcode; eap_session_t *eap_session = eap_session_get(request->parent); - rcode = unlang_interpret_synchronous(request); + rcode = unlang_interpret_synchronous(unlang_interpret_event_list(request), request); if (request->master_state == REQUEST_STOP_PROCESSING) return UNLANG_ACTION_STOP_PROCESSING; @@ -753,7 +753,7 @@ packet_ready: if (unlang_interpret_push_section(request, unlang, RLM_MODULE_FAIL, UNLANG_TOP_FRAME) < 0) { RETURN_MODULE_FAIL; } - rcode = unlang_interpret_synchronous(request); + rcode = unlang_interpret_synchronous(unlang_interpret_event_list(request), request); } return mschap_finalize(p_result, mctx, request, eap_session, rcode); diff --git a/src/modules/rlm_radius/rlm_radius_udp.c b/src/modules/rlm_radius/rlm_radius_udp.c index 96900df2b19..70d51fd7eb8 100644 --- a/src/modules/rlm_radius/rlm_radius_udp.c +++ b/src/modules/rlm_radius/rlm_radius_udp.c @@ -333,7 +333,7 @@ static void status_check_reset(udp_handle_t *h, udp_request_t *u) * Status-Server checks. Manually build the packet, and * all of its associated glue. */ -static void CC_HINT(nonnull) status_check_alloc(fr_event_list_t *el, udp_handle_t *h) +static void CC_HINT(nonnull) status_check_alloc(udp_handle_t *h) { udp_request_t *u; request_t *request; @@ -364,7 +364,6 @@ static void CC_HINT(nonnull) status_check_alloc(fr_event_list_t *el, udp_handle_ talloc_const_free(request->name); request->name = talloc_strdup(request, h->module_name); - request->el = el; request->packet = fr_radius_packet_alloc(request, false); request->reply = fr_radius_packet_alloc(request, false); @@ -846,7 +845,7 @@ static fr_connection_state_t conn_init(void **h_out, fr_connection_t *conn, void * status-check response. */ if (h->inst->parent->status_check) { - status_check_alloc(conn->el, h); + status_check_alloc(h); /* * Start status checking.