]> 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>
Sun, 3 Jul 2011 09:13:53 +0000 (11:13 +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 ab3e61263a1dd3061ce26a34eb869d2458b6ba3b..8984f92d45ae1211b1112e255c571d9c33e9685c 100644 (file)
@@ -1303,7 +1303,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),