# This is bad... at some point the IETF will allocate these.
#
ATTRIBUTE Digest-Response 206 string
-ATTRIBUTE Digest-Attributes 207 tlv concat
+ATTRIBUTE Digest-Attributes 207 tlv
ATTRIBUTE Realm .1 string
ATTRIBUTE Nonce .2 string
ATTRIBUTE Method .3 string
fr_pair_list_t head;
fr_pair_list_t tlv_tmp;
fr_pair_t *vp;
- bool concat;
fr_pair_list_init(&head);
if (data_len < 3) return -1; /* type, length, value */
vp = fr_pair_afrom_da(ctx, parent);
if (!vp) return PAIR_DECODE_OOM;
- /*
- * We don't have a "pair find in out"
- */
- if (flag_concat(&parent->flags)) {
- vp = fr_pair_find_by_da_idx(out, parent, 0);
- concat = (vp != NULL);
- } else {
- vp = NULL;
- concat = false;
- }
-
- if (!vp) vp = fr_pair_afrom_da(ctx, parent);
- if (!vp) return PAIR_DECODE_OOM;
-
/*
* Record where we were in the list when this function was called
* Create a temporary sub-list, so decode errors don't
child = fr_dict_unknown_attr_afrom_num(packet_ctx->tmp_ctx, parent, p[0]);
if (!child) {
error:
- if (!concat) talloc_free(vp);
+ talloc_free(vp);
return -1;
}
}
}
fr_pair_list_append(&vp->vp_group, &tlv_tmp);
- if (!concat) fr_pair_append(out, vp);
+ fr_pair_append(out, vp);
return data_len;
}
/*
* Concatenate consecutive top-level attributes together.
*/
- if (flag_concat(&da->flags) && (da->type == FR_TYPE_OCTETS)) {
+ if (flag_concat(&da->flags)) {
FR_PROTO_TRACE("Concat attribute");
return decode_concat(ctx, out, da, data, packet_ctx->end);
}