]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add trigger_args to trunk
authorNick Porter <nick@portercomputing.co.uk>
Fri, 29 Aug 2025 11:00:45 +0000 (12:00 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 29 Aug 2025 11:00:45 +0000 (12:00 +0100)
src/lib/server/trunk.c

index 69f3510bfa1cc2908e7e55ba7934bb485f302209..f9e4952f34e9c1cd422b758e46d14224a68af724 100644 (file)
@@ -312,6 +312,8 @@ struct trunk_s {
        uint64_t                last_req_per_conn;      //!< The last request to connection ratio we calculated.
        /** @} */
 
+       fr_pair_list_t          *trigger_args;          //!< Passed to trigger
+
        bool                    trigger_undef[NUM_ELEMENTS(trunk_conn_trigger_names)];  //!< Record that a specific trigger is undefined.
 
        CONF_PAIR               *trigger_cp[NUM_ELEMENTS(trunk_conn_trigger_names)];    //!< Cached trigger CONF_PAIRs
@@ -444,7 +446,7 @@ static size_t trunk_connection_events_len = NUM_ELEMENTS(trunk_connection_events
                if (trigger(unlang_interpret_get_thread_default(), trunk->conf.conn_trigger_cs, \
                            &trunk->trigger_cp[idx], \
                            fr_table_str_by_value(trunk_conn_trigger_names, _state, \
-                                                 "<INVALID>"), true, NULL) == -1) { \
+                                                 "<INVALID>"), true, trunk->trigger_args) == -1) { \
                        trunk->trigger_undef[idx] = true; \
                } \
        } \
@@ -477,7 +479,7 @@ void trunk_request_state_log_entry_add(char const *function, int line,
        if (trunk->conf.req_triggers) { \
                trigger(unlang_interpret_get_thread_default(), \
                        trunk->conf.req_trigger_cs, NULL, fr_table_str_by_value(trunk_req_trigger_names, _state, \
-                                                        "<INVALID>"), true, NULL); \
+                                                        "<INVALID>"), true, trunk->trigger_args); \
        } \
 } while (0)