and ensure that setting the flag doesn't change the behavior
for attributes of type "octets"
# This is bad... at some point the IETF will allocate these.
#
ATTRIBUTE Digest-Response 206 string
-ATTRIBUTE Digest-Attributes 207 tlv
+ATTRIBUTE Digest-Attributes 207 tlv concat
ATTRIBUTE Realm .1 string
ATTRIBUTE Nonce .2 string
ATTRIBUTE Method .3 string
return false;
}
- if (type != FR_TYPE_OCTETS) {
- fr_strerror_const("Attributes with the 'concat' flag MUST be of data type 'octets'");
+ if ((type != FR_TYPE_OCTETS) && (type != FR_TYPE_TLV)) {
+ fr_strerror_const("Attributes with the 'concat' flag MUST be of data type 'octets' or 'tlv'");
return false;
}
uint8_t *p;
fr_pair_t *vp;
+ fr_assert(parent->type == FR_TYPE_OCTETS);
+
total = 0;
attr = ptr[0];
/*
* Pass the entire thing to the decoding function
*/
- if (flag_concat(&da->flags)) {
+ if ((da->type == FR_TYPE_OCTETS && flag_concat(&da->flags))) {
FR_PROTO_TRACE("Concat attribute");
return decode_concat(ctx, cursor, da, data, data_len);
}