]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
hoist "set flag" to before we read the config files
authorAlan T. DeKok <aland@freeradius.org>
Mon, 2 Sep 2024 12:57:46 +0000 (08:57 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 2 Sep 2024 12:57:46 +0000 (08:57 -0400)
src/lib/server/main_config.c

index 0808c4fc1faf316f3d87bdeb99e3c65c9c98eabe..22ca4dc8dd31c64404965eb9fd51ea95fc621943 100644 (file)
@@ -1077,6 +1077,11 @@ int main_config_init(main_config_t *config)
         */
        config->talloc_pool_size = 8 * 1024; /* default */
 
+       /*
+        *      Migration flags
+        */
+       if (!tmpl_require_enum_prefix) tmpl_require_enum_prefix = config->require_enum_prefix;
+
        cs = cf_section_alloc(NULL, NULL, "main", NULL);
        if (!cs) return -1;
 
@@ -1420,11 +1425,6 @@ do {\
 
        config->root_cs = cs;   /* Do this last to avoid dangling pointers on error */
 
-       /*
-        *      Migration flags
-        */
-       tmpl_require_enum_prefix = config->require_enum_prefix;
-
        /* Clear any unprocessed configuration errors */
        fr_strerror_clear();