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 0779de4..b813693 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;