]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only 'integer' and 'string' attributes can have tags
authorAlan T. DeKok <aland@freeradius.org>
Mon, 24 Oct 2011 11:53:27 +0000 (13:53 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 26 Oct 2011 07:29:01 +0000 (09:29 +0200)
src/lib/dict.c

index 2f2dc40d262905bb8ed0aa0df836a5de9c6c5200..f1372669fce885873067c3d7aa116bd20b3ca9ac 100644 (file)
@@ -558,6 +558,13 @@ int dict_addattr(const char *name, int attr, unsigned int vendor, int type,
                }
        }
 
+       if (flags.has_tag &&
+           !((type == PW_TYPE_INTEGER) || (type == PW_TYPE_STRING))) {
+               fr_strerror_printf("dict_addattr: Only 'integer' and 'string' attributes can have tags");
+               return -1;
+       }
+
+
        /*
         *      If the attr is '-1', that means use a pre-existing
         *      one (if it already exists).  If one does NOT already exist,