]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't insert static clients into the dynamic client list
authorAlan T. DeKok <aland@freeradius.org>
Fri, 18 Apr 2025 18:37:20 +0000 (14:37 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 18 Apr 2025 18:38:07 +0000 (14:38 -0400)
src/lib/io/master.c

index 31c24b3e874190645e3a5e167b001290db192a43..c9579e52e876a2086c9246a189c0d24ca34fa93c 100644 (file)
@@ -39,7 +39,7 @@ typedef struct {
 
        fr_trie_t                       *trie;                          //!< trie of clients
        fr_heap_t                       *pending_clients;               //!< heap of pending clients
-       fr_heap_t                       *alive_clients;                 //!< heap of active clients
+       fr_heap_t                       *alive_clients;                 //!< heap of active dynamic clients
 
        fr_listen_t                     *listen;                        //!< The master IO path
        fr_listen_t                     *child;                         //!< The child (app_io) IO path
@@ -1057,6 +1057,14 @@ static fr_io_client_t *client_alloc(TALLOC_CTX *ctx, fr_io_client_state_t state,
 
        client->in_trie = true;
 
+       /*
+        *      It's a static client.  Don't insert it into the list of alive clients, as those are only for
+        *      dynamic clients.
+        */
+       if (state == PR_CLIENT_STATIC) return client;
+
+       fr_assert(thread->alive_clients != NULL);
+
        /*
         *      Track the live clients so that we can clean
         *      them up.