From: Alan T. DeKok Date: Thu, 29 Sep 2011 16:03:23 +0000 (+0200) Subject: Load "server {...}" sections properly X-Git-Tag: release_2_1_12~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e229bd59379c6e76f8db281ad1ee43c50bf74f5a;p=thirdparty%2Ffreeradius-server.git Load "server {...}" sections properly --- diff --git a/src/main/modules.c b/src/main/modules.c index 5dcdc9ec649..b739b79106a 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -1220,13 +1220,15 @@ int virtual_servers_load(CONF_SECTION *config) * In either case, load the "default" virtual server first. * this matches better iwth users expectations. */ - cs = cf_section_find_name2(config, "server", NULL); - if (!cs) { - if (load_byserver(config) < 0) { + cs = cf_section_find_name2(cf_subsection_find_next(config, NULL, + "server"), + "server", NULL); + if (cs) { + if (load_byserver(cs) < 0) { return -1; } } else { - if (load_byserver(cs) < 0) { + if (load_byserver(config) < 0) { return -1; } }