]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
minor rearrangement
authorAlan T. DeKok <aland@freeradius.org>
Wed, 1 Sep 2021 13:52:19 +0000 (09:52 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 1 Sep 2021 13:52:19 +0000 (09:52 -0400)
src/protocols/radius/base.c

index 4464385472194dce3b9ea0deeea9de27e0689dcd..8a0fc53bfaf0f78a54989d288616da029aa85813 100644 (file)
@@ -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");