]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove assertion
authorAlan T. DeKok <aland@freeradius.org>
Thu, 20 Apr 2023 21:54:00 +0000 (17:54 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 20 Apr 2023 21:56:15 +0000 (17:56 -0400)
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.

src/protocols/radius/encode.c

index e5c0ad9de5fb264e190b4ad7aadd1c990802713f..41d8bb9559118ad118efaa74ec4f081cd193a582 100644 (file)
@@ -911,7 +911,6 @@ static ssize_t encode_child(fr_dbuff_t *dbuff,
        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;