/*
* Copy children of the DA we're cloning.
*/
- if (dict_attr_acopy_children(dict, cloned, da) < 0) {
- fr_strerror_printf("Failed cloning attribute '%s' from children of %s", da->name, fixup->ref);
- return -1;
- }
+ if (dict_attr_children(da)) {
+ if (dict_attr_acopy_children(dict, cloned, da) < 0) {
+ fr_strerror_printf("Failed cloning attribute '%s' from children of %s", da->name, fixup->ref);
+ return -1;
+ }
- if (dict_attr_child_add(fr_dict_attr_unconst(fixup->parent), cloned) < 0) {
- fr_strerror_printf("Failed adding cloned attribute %s", da->name);
- talloc_free(cloned);
- return -1;
+ if (dict_attr_child_add(fr_dict_attr_unconst(fixup->parent), cloned) < 0) {
+ fr_strerror_printf("Failed adding cloned attribute %s", da->name);
+ talloc_free(cloned);
+ return -1;
+ }
}
if (dict_attr_add_to_namespace(fixup->parent, cloned) < 0) return -1;
# Ignore extended and evs
-ATTRIBUTE Base-Integer64 19 integer64
+#
+# Define an ENUM
+#
+ENUM base-enum-uint64 uint64
+VALUE base-enum-uint64 one 1
+VALUE base-enum-uint64 two 2
+VALUE base-enum-uint64 three 3
+
+ATTRIBUTE Base-Integer64 19 uint64 enum=base-enum-uint64
ATTRIBUTE Base-IPv4-Prefix 20 ipv4prefix
# Ignore VSA, VENDOR, timeval, boolean, combo-ip-prefix, decimal... for now
+
END-PROTOCOL TEST