]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
options have to have class Context
authorAlan T. DeKok <aland@freeradius.org>
Wed, 26 Feb 2025 19:33:30 +0000 (14:33 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 26 Feb 2025 19:40:42 +0000 (14:40 -0500)
src/protocols/der/base.c

index 3fdf90aa3612b5a8185522a601c6d3ed59f10e0a..2707033fb240292988e0b1ead1e888aa799f268b 100644 (file)
@@ -884,6 +884,8 @@ static bool attr_valid(fr_dict_attr_t *da)
                        flags->option = da->attr;
                }
 
+               flags->class = FR_DER_CLASS_CONTEXT;
+
                if ((parent->restrictions & (1 << flags->option)) != 0) {
                        fr_strerror_printf("Parent %s already has a child with option %u - duplicates are not allowed",
                                           da->parent->name, flags->option);
@@ -895,6 +897,8 @@ static bool attr_valid(fr_dict_attr_t *da)
        } else if (parent->is_sequence_of && (parent->sequence_of == FR_DER_TAG_CHOICE)) {
                fr_assert(flags->der_type < FR_DER_TAG_VALUE_MAX);
 
+               flags->class = FR_DER_CLASS_CONTEXT;
+
                if ((parent->restrictions & (1 << flags->der_type)) != 0) {
                        fr_strerror_printf("Parent %s already has a child with tag %s - duplicates are not allowed",
                                           da->parent->name, fr_der_tag_to_str(flags->der_type));