From: Alan T. DeKok Date: Thu, 29 Sep 2011 16:03:23 +0000 (+0200) Subject: Load "server {...}" sections properly X-Git-Tag: release_3_0_0_beta0~617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69766a113f213503940de1dd962bd1ef3fe9a62e;p=thirdparty%2Ffreeradius-server.git Load "server {...}" sections properly --- diff --git a/src/main/modules.c b/src/main/modules.c index 2ef969ce58c..f01531bd75f 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -1280,13 +1280,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; } }