projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55dab3e
)
Hack to let developers catch bad dictionaries
author
Alan T. DeKok
<aland@freeradius.org>
Sat, 5 Mar 2011 07:07:14 +0000
(08:07 +0100)
committer
Alan T. DeKok
<aland@freeradius.org>
Sat, 5 Mar 2011 07:07:14 +0000
(08:07 +0100)
uses fprintf to print warning messages when the attributes are
illegally defined in the IANA standard space
src/lib/dict.c
patch
|
blob
|
history
diff --git
a/src/lib/dict.c
b/src/lib/dict.c
index
c675ed6
..
f613664
100644
(file)
--- 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.
*/