]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
flags are exclusive
authorAlan T. DeKok <aland@freeradius.org>
Fri, 9 Apr 2021 12:20:42 +0000 (08:20 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 9 Apr 2021 12:20:42 +0000 (08:20 -0400)
src/lib/util/dict_tokenize.c

index 9aa4ccdf781fdd58d3b79f8a9dd5708b0f469f5e..81ef255e7f8c4cfa63f79b11be4b550c255e85f2 100644 (file)
@@ -300,6 +300,11 @@ static int dict_process_flag_field(dict_tokenize_ctx_t *ctx, char *name, fr_type
 
                        subtype = fr_table_value_by_str(ctx->dict->subtype_table, key, -1);
                        if (subtype >= 0) {
+                               if (flags->subtype != 0) {
+                                       fr_strerror_printf("Conflicting flag '%s'", key);
+                                       return -1;
+                               }
+
                                flags->subtype = subtype;
                                break;
                        }