We need to fix up encode_tlv(), as for RADIUS, it's really
"encode TLV contents", and not "encode the entire TLV".
The encode_child() function also relies on the encode_value()
funtion to handle grouping attributes, which is likely also wrong.
The RADIUS encoder / decoder is not only more complex than the other
protocols, it was written earlier. i.e. before we cleaned up and
clarified the process of encoding packets.
FR_DBUFF_IN_BYTES_RETURN(&work_dbuff, (uint8_t)da_stack->da[depth]->attr, hlen);
fr_assert(da_stack->da[depth] != NULL);
- fr_assert(fr_type_is_leaf(da_stack->da[depth]->type));
slen = encode_value(&work_dbuff, da_stack, depth, cursor, encode_ctx);
if (slen <= 0) return slen;