From: Alan T. DeKok Date: Sun, 5 Apr 2009 00:44:37 +0000 (+0200) Subject: Don't load pre/post-proxy sections if we're not proxying X-Git-Tag: release_2_1_7~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cbe9872bd416e09789bffe7b0b89503d2649b2b;p=thirdparty%2Ffreeradius-server.git Don't load pre/post-proxy sections if we're not proxying --- diff --git a/src/main/modules.c b/src/main/modules.c index 0779de4c454..b8136939542 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -856,6 +856,18 @@ static int load_byserver(CONF_SECTION *cs) cf_log_module(cs, "Checking %s {...} for more modules to load", section_type_value[comp].section); +#ifdef WITH_PROXY + /* + * Skip pre/post-proxy sections if we're not + * proxying. + */ + if (!mainconfig.proxy_requests && + ((comp == PW_PRE_PROXY_TYPE) || + (comp == PW_PRE_PROXY_TYPE))) { + continue; + } +#endif + if (load_component_section(subcs, server, comp) < 0) { cf_log_info(cs, " }"); return -1;