From: Alan T. DeKok Date: Mon, 24 Oct 2011 11:53:27 +0000 (+0200) Subject: Only 'integer' and 'string' attributes can have tags X-Git-Tag: release_3_0_0_beta0~547 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=276aea90286a956c0006458cbc122ccb83825660;p=thirdparty%2Ffreeradius-server.git Only 'integer' and 'string' attributes can have tags --- diff --git a/src/lib/dict.c b/src/lib/dict.c index 2f2dc40d262..f1372669fce 100644 --- a/src/lib/dict.c +++ b/src/lib/dict.c @@ -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,