and not the non-local one.
* .<oid>
*/
if (fr_sbuff_out(NULL, &oid, name) > 0) {
+ namespace = fr_dict_unlocal(namespace);
+
fr_strerror_clear(); /* Clear out any existing errors */
if (fr_dict_by_da(namespace) == fr_dict_internal()) goto disallow_unknown;
fr_dict_protocol_t const *fr_dict_protocol(fr_dict_t const *dict);
+fr_dict_attr_t const *fr_dict_unlocal(fr_dict_attr_t const *da) CC_HINT(nonnull);
+
fr_dict_t const *fr_dict_by_da(fr_dict_attr_t const *da) CC_HINT(nonnull);
fr_dict_t const *fr_dict_by_attr_name(fr_dict_attr_t const **found, char const *name);
{
return dict->proto;
}
+
+/*
+ * Get the real protocol dictionary behind the local one.
+ */
+fr_dict_attr_t const *fr_dict_unlocal(fr_dict_attr_t const *da)
+{
+ if (!da->flags.local) return da;
+
+ fr_assert(da->dict->root == da);
+
+ while (da->dict->next) {
+ da = da->dict->next->root;
+ }
+
+ return da;
+}