]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set parsed before calling the callback function
authorAlan T. DeKok <aland@freeradius.org>
Fri, 1 Oct 2021 15:41:53 +0000 (11:41 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 5 Oct 2021 18:39:15 +0000 (14:39 -0400)
src/lib/server/cf_parse.c

index 69dd578626d2f962e09c30cf4622b1b42cc8b8e4..609585e3c38cf0505ab5d4d9e3e75ea6cbe4eda8 100644 (file)
@@ -842,6 +842,8 @@ static int CC_HINT(nonnull(4,5)) cf_pair_parse_internal(TALLOC_CTX *ctx, void *o
 
                if (deprecated) goto deprecated;
 
+               cp->parsed = true;
+
                if (rule->func) {
                        cf_log_debug(cs, "%.*s%s = %s", PAIR_SPACE(cs), parse_spaces, cp->attr, cp->value);
                        cp->printed = true;
@@ -850,7 +852,6 @@ static int CC_HINT(nonnull(4,5)) cf_pair_parse_internal(TALLOC_CTX *ctx, void *o
 
                ret = func(ctx, out, base, cf_pair_to_item(cp), rule);
                if (ret < 0) return -1;
-               cp->parsed = true;
        }
 
        return 0;