From: Alan T. DeKok Date: Fri, 28 Feb 2025 01:15:18 +0000 (-0500) Subject: update the restriction flags in more cases X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a332486ed05228d8d99ff1390db93692eeec172;p=thirdparty%2Ffreeradius-server.git update the restriction flags in more cases and correct how we set them. --- diff --git a/src/protocols/der/base.c b/src/protocols/der/base.c index 69496804f29..f20990eb63b 100644 --- a/src/protocols/der/base.c +++ b/src/protocols/der/base.c @@ -880,8 +880,8 @@ static bool attr_valid(fr_dict_attr_t *da) * If the parent is a choice, then the child MUST have a limited set of options / tags. */ parent = fr_dict_attr_ext(da->parent, FR_DICT_ATTR_EXT_PROTOCOL_SPECIFIC); - if (parent->is_choice) { - if (!flags->option) { + if (parent->is_choice || flags->is_option) { + if (!flags->class) { fr_assert(da->attr < FR_DER_TAG_VALUE_MAX); flags->class = FR_DER_CLASS_CONTEXT;