don't add DEFINEs to "child by num" array, as no one should ever
know about the numbers.
Don't set the "internal" flag for string-based attributes.
return -1;
}
+ /*
+ * The parent has children by name only, not by number. Don't even bother trying to track
+ * numbers.
+ */
+ if (parent->flags.name_only) return 0;
+
/*
* We only allocate the pointer array *if* the parent has children.
*/
* is.
*/
if (*attr == -1) {
-
- flags->internal = 1;
+ /*
+ * If we don't care about the number, then this attribute is almost always
+ * an internal one. Unless it's a "name only" attribute for string-based
+ * protocols.
+ */
+ flags->internal |= !flags->name_only;
v = fr_dict_attr_by_name(NULL, fr_dict_root(dict), name);
if (v) {