/*
* Only structural types can have children.
- *
- * @todo - yes, "key" members of FR_TYPE_STRUCT.
*/
if (!fr_type_structural[parent->type]) return false;
return (ref && (ref->dict == child->dict));
}
+ /*
+ * Key fields can have children, but everyone else thinks
+ * that the struct is the parent. <sigh>
+ */
+ if ((parent->type == FR_TYPE_STRUCT) && child->parent->parent == parent) return true;
+
/*
* We're in the same protocol dictionary, but the child
* isn't directly from the parent. Therefore the only