From: Alan T. DeKok Date: Wed, 6 Sep 2023 18:26:59 +0000 (-0400) Subject: decode TLVs nested X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16d1f50c452daaa2b9959b1eca9cd49dac614ae6;p=thirdparty%2Ffreeradius-server.git decode TLVs nested --- diff --git a/src/protocols/radius/decode.c b/src/protocols/radius/decode.c index 7bda93f94f1..8e7685d1e80 100644 --- a/src/protocols/radius/decode.c +++ b/src/protocols/radius/decode.c @@ -478,7 +478,7 @@ static ssize_t decode_rfc(TALLOC_CTX *ctx, fr_pair_list_t *out, slen = fr_pair_array_from_network(ctx, out, da, data + 2, len - 2, decode_ctx, decode_value); } else if (da->type == FR_TYPE_TLV) { - slen = fr_pair_tlvs_from_network(ctx, out, da, data + 2, len - 2, decode_ctx, decode_rfc, NULL, false); + slen = fr_pair_tlvs_from_network(ctx, out, da, data + 2, len - 2, decode_ctx, decode_rfc, NULL, true); } else { slen = decode_value(ctx, out, da, data + 2, len - 2, decode_ctx); @@ -1985,11 +1985,6 @@ ssize_t fr_radius_decode_pair(TALLOC_CTX *ctx, fr_pair_list_t *out, return decode_nas_filter_rule(ctx, out, da, data, data_len, packet_ctx); } - /* - * @todo - call fr_pair_tlvs_from_network(..., fr_radius_decode_pair_value) - * - * And get rid of the hard-coded "concat" crap in the dictionary, and in decode_tlv(). - */ if (data[0] == FR_DIGEST_ATTRIBUTES) { return decode_digest_attributes(ctx, out, da, data, data_len, packet_ctx); }