]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Be less strict about duplicate virtual servers
authorAlan T. DeKok <aland@freeradius.org>
Thu, 30 Jun 2011 14:01:56 +0000 (16:01 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 30 Jun 2011 14:01:56 +0000 (16:01 +0200)
If they share the same top-level CONF_SECTION, they're duplicates.

Otherwise, the server is reloading it's configuration, so the new
configuration should be allowed to be loaded.

src/main/modules.c

index c299247f318f4dee012a557605b3b06866344052..99a8fef4e0e26dc7dfb47080ef1d33f23d2a9068 100644 (file)
@@ -1243,7 +1243,8 @@ int virtual_servers_load(CONF_SECTION *config)
                if (!name2) continue; /* handled above */
 
                server = virtual_server_find(name2);
-               if (server) {
+               if (server &&
+                   (cf_top_section(server->cs) == config)) {
                        radlog(L_ERR, "Duplicate virtual server \"%s\" in file %s:%d and file %s:%d",
                               server->name,
                               cf_section_filename(server->cs),