To separate timeout of connected clients from dynamic clients.
Dynamic client definitions often want long(ish) lifetimes to avoid
repeated verifications of the same client.
#
# idle_timeout:: Time after which idle
- # connections or dynamic clients are deleted.
+ # connections are deleted.
#
# Useful range of values: 5 to 600
#
idle_timeout = 60.0
+ #
+ # dynamic_timeout:: Time after which idle
+ # dynamic clients are deleted.
+ #
+ dynamic_timeout = 600.0
+
#
# nak_lifetime:: Time for which blocked
# clients are placed into a NAK cache.
max_connections = 256
#
- # Free a dynamic client, or close a
- # connection if it does not receive
+ # Close a connection if it does not receive
# a packet within this time.
#
# Useful range of values: 5 to 600
#
idle_timeout = 60.0
+ #
+ # Time after which idle dynamic clients are deleted.
+ #
+ dynamic_timeout = 600.0
+
#
# nak_lifetime:: Time for which blocked
# clients are placed into a NAK cache.
# Useful range of values: 5 to 600
#
idle_timeout = 60.0
+
+ #
+ # dynamic_timeout:: Time after which idle
+ # dynamic clients are deleted.
+ #
+ dynamic_timeout = 600.0
}
}
switch (client->state) {
case PR_CLIENT_CONNECTED:
fr_assert(connection != NULL);
- FALL_THROUGH;
-
- case PR_CLIENT_DYNAMIC:
delay = inst->idle_timeout;
if (fr_time_delta_ispos(client->radclient->limit.idle_timeout) &&
(fr_time_delta_lt(client->radclient->limit.idle_timeout, inst->idle_timeout))) {
}
break;
+ case PR_CLIENT_DYNAMIC:
+ delay = inst->dynamic_timeout;
+ break;
+
case PR_CLIENT_NAK:
delay = inst->nak_lifetime;
break;
* idle timeut.
*/
client->ready_to_delete = true;
- delay = inst->idle_timeout;
+ delay = client->state == PR_CLIENT_DYNAMIC ? inst->dynamic_timeout : inst->idle_timeout;
goto reset_timer;
}
uint32_t max_pending_packets; //!< maximum number of pending packets
fr_time_delta_t cleanup_delay; //!< for Access-Request packets
- fr_time_delta_t idle_timeout; //!< for dynamic clients
+ fr_time_delta_t idle_timeout; //!< for connected clients
+ fr_time_delta_t dynamic_timeout; //!< for dynamic clients
fr_time_delta_t nak_lifetime; //!< lifetime of NAKed clients
fr_time_delta_t check_interval; //!< polling for closed sockets
static conf_parser_t const limit_config[] = {
{ FR_CONF_OFFSET("cleanup_delay", proto_dhcpv4_t, io.cleanup_delay), .dflt = "5.0" } ,
{ FR_CONF_OFFSET("idle_timeout", proto_dhcpv4_t, io.idle_timeout), .dflt = "30.0" } ,
+ { FR_CONF_OFFSET("dynamic_timeout", proto_dhcpv4_t, io.dynamic_timeout), .dflt = "600.0" } ,
{ FR_CONF_OFFSET("nak_lifetime", proto_dhcpv4_t, io.nak_lifetime), .dflt = "30.0" } ,
{ FR_CONF_OFFSET("max_connections", proto_dhcpv4_t, io.max_connections), .dflt = "1024" } ,
static conf_parser_t const limit_config[] = {
{ FR_CONF_OFFSET("cleanup_delay", proto_dhcpv6_t, io.cleanup_delay), .dflt = "5.0" } ,
{ FR_CONF_OFFSET("idle_timeout", proto_dhcpv6_t, io.idle_timeout), .dflt = "30.0" } ,
+ { FR_CONF_OFFSET("dynamic_timeout", proto_dhcpv6_t, io.dynamic_timeout), .dflt = "600.0" } ,
{ FR_CONF_OFFSET("nak_lifetime", proto_dhcpv6_t, io.nak_lifetime), .dflt = "30.0" } ,
{ FR_CONF_OFFSET("max_connections", proto_dhcpv6_t, io.max_connections), .dflt = "1024" } ,
static conf_parser_t const limit_config[] = {
{ FR_CONF_OFFSET("cleanup_delay", proto_radius_t, io.cleanup_delay), .dflt = "5.0" } ,
{ FR_CONF_OFFSET("idle_timeout", proto_radius_t, io.idle_timeout), .dflt = "30.0" } ,
+ { FR_CONF_OFFSET("dynamic_timeout", proto_radius_t, io.dynamic_timeout), .dflt = "600.0" } ,
{ FR_CONF_OFFSET("nak_lifetime", proto_radius_t, io.nak_lifetime), .dflt = "30.0" } ,
{ FR_CONF_OFFSET("max_connections", proto_radius_t, io.max_connections), .dflt = "1024" } ,
static conf_parser_t const limit_config[] = {
{ FR_CONF_OFFSET("idle_timeout", proto_tacacs_t, io.idle_timeout), .dflt = "30.0" } ,
+ { FR_CONF_OFFSET("dynamic_timeout", proto_tacacs_t, io.dynamic_timeout), .dflt = "600.0" } ,
{ FR_CONF_OFFSET("max_connections", proto_tacacs_t, io.max_connections), .dflt = "1024" } ,
static conf_parser_t const limit_config[] = {
{ FR_CONF_OFFSET("idle_timeout", proto_vmps_t, io.idle_timeout), .dflt = "30.0" } ,
+ { FR_CONF_OFFSET("dynamic_timeout", proto_vmps_t, io.dynamic_timeout), .dflt = "600.0" } ,
{ FR_CONF_OFFSET("nak_lifetime", proto_vmps_t, io.nak_lifetime), .dflt = "30.0" } ,
{ FR_CONF_OFFSET("max_connections", proto_vmps_t, io.max_connections), .dflt = "1024" } ,