]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
inherit internal flag from parent
authorAlan T. DeKok <aland@freeradius.org>
Tue, 13 Dec 2022 15:50:54 +0000 (10:50 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 13 Dec 2022 15:50:54 +0000 (10:50 -0500)
so we can do

&reply += {
     &26.80.10 = 0xabcdef
}

and have it show up in a RADIUS packet

src/lib/server/tmpl_tokenize.c

index 0ad0789654017ac751fcdaf4b21986cfceaffb04..91c601614404371af20fe40c77a0c8a5e970f428 100644 (file)
@@ -1746,7 +1746,11 @@ static inline int tmpl_attr_afrom_attr_substr(TALLOC_CTX *ctx, tmpl_attr_error_t
                        }
                        break;
                }
-               da_unknown->flags.internal = 1;
+
+               /*
+                *      Inherit the internal flag from our parent.
+                */
+               da_unknown->flags.internal = (parent == NULL) | parent->flags.internal;
 
                *ar = (tmpl_attr_t){
                        .ar_num = NUM_UNSPEC,