]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add and document response_window
authorAlan T. DeKok <aland@freeradius.org>
Mon, 23 Aug 2021 18:41:25 +0000 (14:41 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 23 Aug 2021 18:43:44 +0000 (14:43 -0400)
raddb/mods-available/radius
src/modules/rlm_radius/rlm_radius.c
src/modules/rlm_radius/rlm_radius.h

index 6eeae1f3647b62ae34d01fbfb4e35ce0a9fb6161..c41430a57447f168e00295bef243a2da7c809296 100644 (file)
@@ -164,6 +164,12 @@ radius {
 
        }
 
+       #
+       #  response_window: If we do not receive a reply within this time period, then
+       #  start `zombie_period`
+       #
+       response_window = 15
+
        #
        #  zombie_period:: If the home server does not reply to a packet, the
        #  `zombie_period` starts.
index 3d08419273450828235efe75501b239004d0a240..8a03a6f210396df2ad3f3b9c09ebfd6f60ba845a 100644 (file)
@@ -117,6 +117,8 @@ static CONF_PARSER const module_config[] = {
 
        { FR_CONF_OFFSET("max_attributes", FR_TYPE_UINT32, rlm_radius_t, max_attributes), .dflt = STRINGIFY(RADIUS_MAX_ATTRIBUTES) },
 
+       { FR_CONF_OFFSET("response_window", FR_TYPE_TIME_DELTA, rlm_radius_t, response_window), .dflt = STRINGIFY(20) },
+
        { FR_CONF_OFFSET("zombie_period", FR_TYPE_TIME_DELTA, rlm_radius_t, zombie_period), .dflt = STRINGIFY(40) },
 
        { FR_CONF_OFFSET("revive_interval", FR_TYPE_TIME_DELTA, rlm_radius_t, revive_interval) },
@@ -592,6 +594,9 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
        FR_INTEGER_BOUND_CHECK("trunk.per_connection_max", inst->trunk_conf.max_req_per_conn, <=, 255);
        FR_INTEGER_BOUND_CHECK("trunk.per_connection_target", inst->trunk_conf.target_req_per_conn, <=, inst->trunk_conf.max_req_per_conn / 2);
 
+       FR_TIME_DELTA_BOUND_CHECK("response_window", inst->zombie_period, >=, fr_time_delta_from_sec(1));
+       FR_TIME_DELTA_BOUND_CHECK("response_window", inst->zombie_period, <=, fr_time_delta_from_sec(120));
+
        FR_TIME_DELTA_BOUND_CHECK("zombie_period", inst->zombie_period, >=, fr_time_delta_from_sec(1));
        FR_TIME_DELTA_BOUND_CHECK("zombie_period", inst->zombie_period, <=, fr_time_delta_from_sec(120));
 
index f199c19758c8d22963bcc594001c3a9246e9a662..83291b3a625ca9c17a572c4078be981837b273ce 100644 (file)
@@ -56,6 +56,7 @@ struct rlm_radius_s {
        void                    *io_instance;           //!< Easy access to the IO instance
        CONF_SECTION            *io_conf;               //!< Easy access to the IO config section
 
+       fr_time_delta_t         response_window;
        fr_time_delta_t         zombie_period;
        fr_time_delta_t         revive_interval;