]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
recurse on decode TLVs, instead of !TLV
authorAlan T. DeKok <aland@freeradius.org>
Sat, 23 Sep 2017 01:46:49 +0000 (21:46 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 23 Sep 2017 01:46:49 +0000 (21:46 -0400)
and decode the contents of the TLV, instead of TLV itself

src/modules/rlm_eap/types/rlm_eap_fast/eap_fast.c

index 4df0e86a7f73f40ef0ddc340880584fe1b4ff84c..3dc9dc34bfad2ca8996100d8bab313b470945dcc 100644 (file)
@@ -450,9 +450,11 @@ ssize_t eap_fast_decode_pair(TALLOC_CTX *ctx, vp_cursor_t *cursor, fr_dict_attr_
                da = fr_dict_attr_child_by_num(parent, attr);
                if (!da) {
                        MEM(vp = fr_pair_afrom_child_num(ctx, parent, attr));
-               } else if (da->type != FR_TYPE_TLV) {
-                       p += (size_t) eap_fast_decode_pair(ctx, cursor, parent, data, data_len, decoder_ctx);
+
+               } else if (da->type == FR_TYPE_TLV) {
+                       p += (size_t) eap_fast_decode_pair(ctx, cursor, parent, p, end - p, decoder_ctx);
                        continue;
+
                } else {
                        MEM(vp = fr_pair_afrom_da(ctx, da));
                }