From: Alejandro Perez Date: Tue, 9 May 2017 12:33:31 +0000 (+0200) Subject: Set idle_timeout to 5s to all the dynamic home servers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b49aa32013ca8b994dbbdb10895c879275d9b6e5;p=thirdparty%2Ffreeradius-server.git Set idle_timeout to 5s to all the dynamic home servers Dynamically generated home servers get eventually replaced. We want sockets using these servers to close as soon as possible, to make sure that whenever a pool is replaced, sockets using old ones will not last long (hopefully less than 300s). --- diff --git a/src/modules/rlm_realm/trustrouter.c b/src/modules/rlm_realm/trustrouter.c index 3f97242f637..3e49ed04871 100644 --- a/src/modules/rlm_realm/trustrouter.c +++ b/src/modules/rlm_realm/trustrouter.c @@ -180,7 +180,12 @@ static home_server_t *srvr_blk_to_home_server(TALLOC_CTX *ctx, hs->secret = talloc_strdup(hs, "radsec"); hs->response_window.tv_sec = 30; hs->last_packet_recv = time(NULL); - + /* + * We want sockets using these servers to close as soon as possible, + * to make sure that whenever a pool is replaced, sockets using old ones + * will not last long (hopefully less than 300s). + */ + hs->limit.idle_timeout = 5; hs->tls = construct_tls(inst, hs, blk); if (!hs->tls) { talloc_free(hs);