]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
we can't add VALUEs for ALIASes
authorAlan T. DeKok <aland@freeradius.org>
Fri, 17 Feb 2023 00:18:38 +0000 (19:18 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 17 Feb 2023 02:54:19 +0000 (21:54 -0500)
the values should be added only for the attribute

src/lib/util/dict_util.c

index 3f81cc3d2d2ee22c8ac2ecc6493489b1385ee3f7..fdf9fec462fad951d93c89a80d3118cd6f700b9d 100644 (file)
@@ -1377,6 +1377,11 @@ int dict_attr_enum_add_name(fr_dict_attr_t *da, char const *name,
                return -1;
        }
 
+       if (da->flags.is_alias) {
+               fr_strerror_printf("Enumeration names cannot be added for ALIAS '%s'", fr_type_to_str(da->name));
+               return -1;
+       }
+
        ext = fr_dict_attr_ext(da, FR_DICT_ATTR_EXT_ENUMV);
        if (!ext) {
                fr_strerror_printf("VALUE cannot be defined for %s", da->name);