]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Set idle_timeout to 5s to all the dynamic home servers
authorAlejandro Perez <alejandro.perez.mendez@gmail.com>
Tue, 9 May 2017 12:33:31 +0000 (14:33 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 9 May 2017 13:37:34 +0000 (09:37 -0400)
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).

src/modules/rlm_realm/trustrouter.c

index 3f97242f637d8d9fa4795654dec34ad9d367cd73..3e49ed04871e162bb2d507738fa2d1034a5e49a0 100644 (file)
@@ -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);