]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
just look at the dict, instead of calling common ancestor
authorAlan T. DeKok <aland@freeradius.org>
Tue, 12 Sep 2023 18:21:06 +0000 (14:21 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 12 Sep 2023 18:21:06 +0000 (14:21 -0400)
because if we check for a common ancestor between a da and the
dict root, we're just checking if the da is in the dict.

src/lib/eap_aka_sim/encode.c

index eec1e4776118e6fb891a101df9c0b31c059420fd..ee0a11ca9d03390b4079a5994615a63399910336 100644 (file)
@@ -74,12 +74,14 @@ static bool is_eap_aka_encodable(void const *item, UNUSED void const *uctx)
 
        if (!vp) return false;
        if (vp->da->flags.internal) return false;
+
        /*
         *      Bool attribute presence is 'true' in SIM
         *      and absence is 'false'
         */
        if ((vp->vp_type == FR_TYPE_BOOL) && (vp->vp_bool == false)) return false;
-       if (!fr_dict_attr_common_parent(fr_dict_root(dict_eap_aka_sim), vp->da, true)) return false;
+
+       if (vp->da->dict != dict_eap_aka_sim, vp->da) return false;
 
        return true;
 }