Skip to content

Commit 4c7bb78

Browse files
committed
options have to have class Context
1 parent 84b3c65 commit 4c7bb78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/protocols/der/base.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,8 @@ static bool attr_valid(fr_dict_attr_t *da)
884884
flags->option = da->attr;
885885
}
886886

887+
flags->class = FR_DER_CLASS_CONTEXT;
888+
887889
if ((parent->restrictions & (1 << flags->option)) != 0) {
888890
fr_strerror_printf("Parent %s already has a child with option %u - duplicates are not allowed",
889891
da->parent->name, flags->option);
@@ -895,6 +897,8 @@ static bool attr_valid(fr_dict_attr_t *da)
895897
} else if (parent->is_sequence_of && (parent->sequence_of == FR_DER_TAG_CHOICE)) {
896898
fr_assert(flags->der_type < FR_DER_TAG_VALUE_MAX);
897899

900+
flags->class = FR_DER_CLASS_CONTEXT;
901+
898902
if ((parent->restrictions & (1 << flags->der_type)) != 0) {
899903
fr_strerror_printf("Parent %s already has a child with tag %s - duplicates are not allowed",
900904
da->parent->name, fr_der_tag_to_str(flags->der_type));

0 commit comments

Comments
 (0)