]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't load pre/post-proxy sections if we're not proxying
authorAlan T. DeKok <aland@freeradius.org>
Sun, 5 Apr 2009 00:44:37 +0000 (02:44 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 5 Apr 2009 00:44:37 +0000 (02:44 +0200)
src/main/modules.c

index 0779de4c4543b08021c3afa7b92952254f984b1c..b8136939542ca5418c44fa1fe17c6721877d4262 100644 (file)
@@ -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;