Skip to content

Commit

Permalink
allow octets[n] in previous MEMBERs, too
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Aug 13, 2019
1 parent 1665415 commit 1e9ab75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/util/dict.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1e9ab75

Please sign in to comment.