From: Alan T. DeKok Date: Fri, 17 Feb 2023 00:18:38 +0000 (-0500) Subject: we can't add VALUEs for ALIASes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5905906b97450c4f29fa6a76a04388aa18f83956;p=thirdparty%2Ffreeradius-server.git we can't add VALUEs for ALIASes the values should be added only for the attribute --- diff --git a/src/lib/util/dict_util.c b/src/lib/util/dict_util.c index 3f81cc3d2d2..fdf9fec462f 100644 --- a/src/lib/util/dict_util.c +++ b/src/lib/util/dict_util.c @@ -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);