]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
call cf_section_parse_init() for referenced rules, too
authorAlan T. DeKok <aland@freeradius.org>
Fri, 6 Dec 2024 21:02:31 +0000 (16:02 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 7 Dec 2024 14:36:48 +0000 (09:36 -0500)
src/lib/server/cf_parse.c

index 1ead95765ea37de427fc9cd8fe06b5f8eeca4f29..301d53de1f673a4e15be6a0f24dcc411fd740c21 100644 (file)
@@ -793,6 +793,17 @@ static int cf_section_parse_init(CONF_SECTION *cs, void *base, conf_parser_t con
         *      this section.
         */
        if ((rule->flags & CONF_FLAG_REF) != 0) {
+               conf_parser_t const *rule_p;
+               uint8_t *sub_base = base;
+
+               fr_assert(rule->subcs != NULL);
+
+               sub_base += rule->offset;
+
+               for (rule_p = rule->subcs; rule_p->name1; rule_p++) {
+                       int ret = cf_section_parse_init(cs, sub_base, rule_p);
+                       if (ret < 0) return ret;
+               }
                return 0;
        }