return -1;
}
-#if 0
/*
* Look up the REAL parent TLV.
*/
parent &= ~(fr_attr_mask[my_depth] << fr_attr_shift[my_depth]);
- da = dict_attrbyvalue(parent, block_);
+ da = dict_attrbyvalue(parent, da->vendor);
if (!da) {
fr_strerror_printf("dict_init: %s[%d]: Parent attribute is undefined.", fn, line);
return -1;
}
}
-#endif
/*
* Set which type of attribute this is.
*/
VP_TRACE("vp2data_any: %u attr %u -> %u\n",
nest, vp->attribute, vp->attribute >> fr_attr_shift[nest + 1]);
- if ((nest < fr_attr_max_tlv) &&
+ if (vp->flags.is_tlv && (nest < fr_attr_max_tlv) &&
((vp->attribute >> fr_attr_shift[nest + 1]) != 0)) {
return vp2data_tlvs(packet, original, secret, nest + 1, pvp,
start, room);