From: Alan T. DeKok Date: Wed, 21 Dec 2022 15:24:59 +0000 (-0500) Subject: use the correct API here. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29b489c27a273235c9356689b944bc5990eeb75d;p=thirdparty%2Ffreeradius-server.git use the correct API here. There's no need to create a vendor intermediary --- diff --git a/src/lib/util/struct.c b/src/lib/util/struct.c index a359fa0c083..1bc13fbc76a 100644 --- a/src/lib/util/struct.c +++ b/src/lib/util/struct.c @@ -339,13 +339,14 @@ ssize_t fr_struct_from_network(TALLOC_CTX *ctx, fr_pair_list_t *out, if (!child) { unknown_child: /* - * Encode the unknown child as attribute - * number 0. This choice means we don't - * have to look up, or keep track of, the - * number of children of the key field. + * Always encode the unknown child as + * attribute number 0. Since the unknown + * children have no "real" number, and + * are all unique da's, they are + * incomparable. And thus can all be + * given the same number. */ - child = fr_dict_unknown_afrom_fields(child_ctx, key_vp->da, - fr_dict_vendor_num_by_da(key_vp->da), 0); + child = fr_dict_unknown_attr_afrom_num(child_ctx, key_vp->da, 0); if (!child) { FR_PROTO_TRACE("failed allocating unknown child?"); goto unknown;