]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
we can't use BEGIN/END on structs
authorAlan T. DeKok <aland@freeradius.org>
Sun, 23 Nov 2025 13:41:58 +0000 (08:41 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 23 Nov 2025 13:41:58 +0000 (08:41 -0500)
for now, we do auto-push.

src/lib/util/dict_tokenize.c

index 6a2ce9410d175aacabef57d44e86ef5b7901ddd3..5fe714cfb6f093b2cd485a0718acddbe5e04dcef 100644 (file)
@@ -1732,7 +1732,12 @@ static int dict_read_process_begin(dict_tokenize_ctx_t *dctx, char **argv, int a
                return -1;
        }
 
-       if (!fr_type_is_tlv(da->type) && !fr_type_is_struct(da->type) && (da->type != FR_TYPE_UNION)) {
+       /*
+        *      We cannot use BEGIN/END on structs.  Once they're defined, they can't be modified.
+        *
+        *      This restriction can be lifted once we don't auto-push on FR_TYPE_STRUCT.
+        */
+       if (!fr_type_is_tlv(da->type) && (da->type != FR_TYPE_UNION)) {
                fr_strerror_printf("BEGIN %s cannot be used with data type '%s'",
                                   argv[0],
                                   fr_type_to_str(da->type));