]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
look in root for virtual server
authorAlan T. DeKok <aland@freeradius.org>
Mon, 8 Apr 2019 20:31:42 +0000 (16:31 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 8 Apr 2019 20:32:18 +0000 (16:32 -0400)
as virtual servers haven't been bootstrapped yet, so we can't
call virtual_server_find()

src/lib/server/client.c

index 8512a1303774278d651fdc37a1212fed910030ca..5b5203b6d24669b6d142cb1591a7fee93c7e4779 100644 (file)
@@ -220,7 +220,12 @@ bool client_add(RADCLIENT_LIST *clients, RADCLIENT *client)
                        CONF_SECTION *cs;
                        CONF_SECTION *subcs;
 
-                       cs = virtual_server_find(client->server);
+                       if (!client->cs) {
+                               ERROR("Failed to find configuration section in client.  Ignoring 'virtual_server' directive");
+                               return false;
+                       }
+
+                       cs = cf_section_find(cf_root(client->cs), "server", client->server);
                        if (!cs) {
                                ERROR("Failed to find virtual server %s", client->server);
                                return false;