because the struct encoder can be updated to allow that.
Note that the struct encode / decode has not yet been updated
break;
case FR_TYPE_UNION:
- if (da->type != FR_TYPE_STRUCT) {
+ if (!((da->type == FR_TYPE_STRUCT) || (da->type == FR_TYPE_TLV) || fr_type_is_leaf(da->type))) {
fr_strerror_printf("Attributes of type '%s' cannot be children of the 'union' type",
fr_type_to_str(type));
return false;
MEMBER Nested-Uint2 uint8
END Test-Struct2.Data
+BEGIN Test-Struct2.Data
+ATTRIBUTE Thingy 2 tlv
+ATTRIBUTE Child .1 string
+END Test-Struct2.Data
+
ATTRIBUTE Unit-TLV 254 tlv
ATTRIBUTE Milliseconds 254.1 date precision=milliseconds
ATTRIBUTE Delta-MSec 254.2 time_delta precision=milliseconds