]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Revert "hoist "set global client list" to client_list_init()"
authorAlan T. DeKok <aland@freeradius.org>
Tue, 25 May 2021 14:56:59 +0000 (10:56 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 25 May 2021 14:56:59 +0000 (10:56 -0400)
This reverts commit 0a36ef3dafaa9b4c5415772ec43b08b34e93be8b.

src/main/client.c

index 20a5a927c77e1cd08aac46554e3684ed177da0fa..7f4d6545bb92f4ccc89012e04b6d7849bdd41f4c 100644 (file)
@@ -158,10 +158,6 @@ RADCLIENT_LIST *client_list_init(CONF_SECTION *cs)
                client_list_free(clients);
                return false;
        }
-       if (!cs) {
-               rad_assert(root_clients == NULL);
-               root_clients = clients;
-       }
 
        return clients;
 }
@@ -701,6 +697,13 @@ RADCLIENT_LIST *client_list_parse_section(CONF_SECTION *section, UNUSED bool tls
 
        }
 
+       /*
+        *      Replace the global list of clients with the new one.
+        *      The old one is still referenced from the original
+        *      configuration, and will be freed when that is freed.
+        */
+       if (global) root_clients = clients;
+
        return clients;
 }