]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove request->el
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 8 Sep 2021 23:29:07 +0000 (18:29 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 8 Sep 2021 23:30:21 +0000 (18:30 -0500)
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.

20 files changed:
src/bin/unit_test_module.c
src/lib/io/worker.c
src/lib/server/exec.c
src/lib/server/exec_legacy.c
src/lib/server/request.h
src/lib/server/trigger.c
src/lib/server/virtual_servers.c
src/lib/unlang/interpret.c
src/lib/unlang/interpret.h
src/lib/unlang/interpret_synchronous.c
src/lib/unlang/io.c
src/lib/unlang/module.c
src/lib/unlang/subrequest_child.c
src/lib/unlang/xlat.c
src/lib/unlang/xlat_eval.c
src/modules/proto_bfd/proto_bfd.c
src/modules/proto_ldap_sync/proto_ldap_sync.c
src/modules/rlm_eap/types/rlm_eap_gtc/rlm_eap_gtc.c
src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c
src/modules/rlm_radius/rlm_radius_udp.c

index 933f483f1bfa91af4455f94cfe41f62b97c5ea08..7c592408317e5ff5032314230f93c2b64edf58d7 100644 (file)
@@ -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);
                }
        }
index 806824ca0cf9543227eb2e77db1735b314903de3..9331395d9566d09f92de7686d13b1822ef2ae132 100644 (file)
@@ -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.
index efa5ac4c5a5c6632590ffdc4e8c2c1e4cd5a5672..1abe27a3548361ebe6a2cc35c9aa67dc206f5e26 100644 (file)
@@ -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);
index ce5069848d3318a6cb08e9ff6bebf657412a15b7..16e5b0af5ecfaa6fcd1720f7bee1ba374b6f1b63 100644 (file)
@@ -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;
index 4f05fa079d195a15d33c0815bb572553e2fc3390..952fac03f582f11874a4ab0af281ba51cce89390 100644 (file)
@@ -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
index 49097417f3dcd5d2c5ea1f2c27952d0637051546..6e4cc33db5b464547a55a43b45dea10c6ad03901 100644 (file)
@@ -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);
        }
 
index a6b0f305bb05f33986beaf5de0e161d6d81ed80c..b5ef5da84d2fbcae62ca2eb017e16626fe8f90e6 100644 (file)
@@ -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;
index 4a2ba02e849db04dc539140e7637969091900611..70f814e89385b4150287c230358cdb2b58b31b02 100644 (file)
@@ -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
  *
  */
index 43c682d9d071ec4a6c01a8a9893593da09d8a19e..17f3849ff33aa3ec1d2971c1028dfcfbc4846bf9 100644 (file)
@@ -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);
 
index d6b1d327db7830d53b1df69023654926a26ccc33..08241570233844c9cfe9722f102a695b47281be3 100644 (file)
@@ -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;
index cd8bdb6a17f7eb2b86ee9cc2cd12db0fc06d60e8..7af6079cb67fc6e5e5ec7c0e7c0d08ccdbefb05f 100644 (file)
@@ -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.
index 90bfd14b092965a4c1afc6365859b46328428433..a6205f58ba4caecc7fd598ed735e98ac9643446c 100644 (file)
@@ -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;
index bc87d93fcf0969a6a10d37f2a242d656d26e192c..8eee8ef28becfa1e5f1fe7474561e13f53755013 100644 (file)
@@ -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;
index 6c5909204823f64fc869735a534bed1e41f6f994..b9e3efc16fe21b7f5f31ce31fa903c4932e87fac 100644 (file)
@@ -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;
index 10eac2e42739c2573fbf96d841c19aaf4a4d997a..8a2a2435debdb606b579e0bb1cef0e89ef39491c 100644 (file)
@@ -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;
 
index c8689426c623cfe99856605ccdbcb4691273284a..0fb883e2512b4d31876ad333ece9d2cf1f33b48c 100644 (file)
@@ -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("}");
 
                /*
index 5a182117d31bab63df8c9d19a059deccd2c13db6..48e90d5d9dcccc5cd7806497657c239be3c0daeb 100644 (file)
@@ -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:
index eee8d1b82e1e1edccb6899af3114bb3da0f6bb69..26a8b2aa7e3096740a8afe76e0b8e74a97e99e80 100644 (file)
@@ -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;
 
index 9903d14f102db0ba3bdae84ebbad9129035a3070..6829dd1edf6f5bb6333a5dc8435f396106c5caa4 100644 (file)
@@ -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);
index 96900df2b19b5080eb215679a19b57bbd4f5243c..70d51fd7eb875858a3dff3d7e53821d268c9c3ae 100644 (file)
@@ -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.