From: Alan T. DeKok Date: Sat, 5 Mar 2011 07:07:14 +0000 (+0100) Subject: Hack to let developers catch bad dictionaries X-Git-Tag: release_2_1_11~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76edd3650564909279262201085412ee0059d4a6;p=thirdparty%2Ffreeradius-server.git Hack to let developers catch bad dictionaries uses fprintf to print warning messages when the attributes are illegally defined in the IANA standard space --- diff --git a/src/lib/dict.c b/src/lib/dict.c index c675ed6202b..f61366465bc 100644 --- a/src/lib/dict.c +++ b/src/lib/dict.c @@ -995,6 +995,18 @@ static int process_attribute(const char* fn, const int line, flags.is_tlv = 1; } +#ifdef WITH_DICTIONARY_WARNINGS + /* + * Hack to help us discover which vendors have illegal + * attributes. + */ + if (!vendor && (value < 256) && + !strstr(fn, "rfc") && !strstr(fn, "illegal")) { + fprintf(stderr, "WARNING: Illegal Attribute %s in %s\n", + argv[0], fn); + } +#endif + /* * Add it in. */