From: Alan T. DeKok Date: Wed, 1 Sep 2021 13:52:19 +0000 (-0400) Subject: minor rearrangement X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2edd04752afd1a36297f8c56aa642771432d2355;p=thirdparty%2Ffreeradius-server.git minor rearrangement --- diff --git a/src/protocols/radius/base.c b/src/protocols/radius/base.c index 44643854721..8a0fc53bfaf 100644 --- a/src/protocols/radius/base.c +++ b/src/protocols/radius/base.c @@ -1157,11 +1157,6 @@ static bool attr_valid(UNUSED fr_dict_t *dict, fr_dict_attr_t const *parent, return false; } - if (flags->subtype > FLAG_ENCRYPT_ASCEND_SECRET) { - fr_strerror_printf("Invalid flag value %u", flags->subtype); - return false; - } - /* * No special flags, so we're OK. * @@ -1169,6 +1164,11 @@ static bool attr_valid(UNUSED fr_dict_t *dict, fr_dict_attr_t const *parent, */ if (!flags->subtype) return true; + if (flags->subtype > FLAG_ENCRYPT_ASCEND_SECRET) { + fr_strerror_printf("Invalid flag value %u", flags->subtype); + return false; + } + if (flag_concat(flags)) { if (!parent->flags.is_root) { fr_strerror_const("Attributes with the 'concat' flag MUST be at the root of the dictionary");