]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
follow references for non-group attributes
authorAlan T. DeKok <aland@freeradius.org>
Thu, 17 Dec 2020 14:50:10 +0000 (09:50 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 17 Dec 2020 14:53:18 +0000 (09:53 -0500)
src/lib/util/dict_util.c

index 8b2d5aca481f439d4a49a5725709c2e9749dd8ea..6252ebff38cc04b22702baac55165da1208840f2 100644 (file)
@@ -1828,6 +1828,17 @@ ssize_t fr_dict_oid_component(fr_dict_attr_err_t *err,
                return -fr_sbuff_marker_release_behind(&start);
        }
 
+       /*
+        *      Follow references, unless this attribute is a grouping
+        *      attribute.
+        */
+       if (child->type != FR_TYPE_GROUP) {
+               fr_dict_attr_t const *ref;
+
+               ref = fr_dict_attr_ref(child);
+               if (ref) child = ref;
+       }
+
        *out = child;
 
        return fr_sbuff_marker_release_behind(&start);