From 1e9ab75beefcb8b4393804e3a21ec4ab5dd07653 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Tue, 13 Aug 2019 16:58:14 -0400 Subject: [PATCH] allow octets[n] in previous MEMBERs, too --- src/lib/util/dict.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/util/dict.c b/src/lib/util/dict.c index 86b77ee8a21d..3e4af6f9d164 100644 --- a/src/lib/util/dict.c +++ b/src/lib/util/dict.c @@ -1110,7 +1110,9 @@ static bool dict_attr_fields_valid(fr_dict_t *dict, fr_dict_attr_t const *parent return false; } - if (dict_attr_sizes[sibling->type][1] == ~(size_t) 0) { + if ((dict_attr_sizes[sibling->type][1] == ~(size_t) 0) && + !((sibling->type == FR_TYPE_OCTETS) && + (sibling->flags.length > 0))) { fr_strerror_printf("Only the last child of a 'struct' attribute can have variable length"); return false; }