ssize_t slen;
fr_pair_t *vp = NULL;
uint8_t prefix_len;
+ fr_dhcpv6_decode_ctx_t *packet_ctx = decode_ctx;
FR_PROTO_HEX_DUMP(data, data_len, "decode_value");
break;
case FR_TYPE_STRUCT:
- slen = fr_struct_from_network(ctx, out, parent, data, data_len, false,
+ slen = fr_struct_from_network(ctx, out, parent, data, data_len, packet_ctx->struct_nested,
decode_ctx, decode_value_trampoline, decode_tlv_trampoline);
if (slen < 0) goto raw;
uint32_t transaction_id; //!< previous transaction ID
uint8_t *duid; //!< the expected DUID, in wire format
size_t duid_len; //!< length of the expected DUID
+ bool struct_nested; //!< decode structs as nested
} fr_dhcpv6_decode_ctx_t;
/*
* attribute, OR it's already been grouped
* into a contiguous memory buffer.
*/
- ret = fr_struct_from_network(ctx, out, parent, p, attr_len, false,
+ ret = fr_struct_from_network(ctx, out, parent, p, attr_len, packet_ctx->struct_nested,
packet_ctx, decode_value_trampoline, decode_tlv_trampoline);
if (ret < 0) goto raw;
return attr_len;
int salt_offset; //!< for tunnel passwords
bool tunnel_password_zeros; //!< check for trailing zeros on decode
bool disallow_tunnel_passwords; //!< not all packets can have tunnel passwords
+ bool struct_nested; //!< decode structs as nested
uint8_t tag; //!< current tag for encoding
fr_radius_tag_ctx_t **tags; //!< for decoding tagged attributes