* attribute will be resolved in, so the
* only way of recording what the parent
* is by looking at the da.
+ *
+ * Else no da reference, the parent is the namespace.
*/
- if (da) our_parent = da->parent;
+ if (da) {
+ our_parent = da->parent;
+ } else {
+ our_parent = namespace;
+ }
/*
* Otherwise we're resolving in the context of the last component,
* or its reference in the case of group attributes.
*/
switch (dict_err) {
case FR_DICT_ATTR_NO_CHILDREN:
- if (our_parent && our_parent->flags.is_unknown) break;
+ if (our_parent->flags.is_unknown) break;
goto error;
case FR_DICT_ATTR_NOT_DESCENDENT:
* reference.
*/
if (da) {
- fr_assert(our_parent != NULL);
-
MEM(ar = talloc(ctx, tmpl_attr_t));
*ar = (tmpl_attr_t){
.ar_num = NUM_UNSPEC,
goto error;
}
- fr_assert(our_parent != NULL);
-
/*
* See if the ref begins with an unsigned integer
* if it does it's probably an OID component