summaryrefslogtreecommitdiff
path: root/conf/cf-lex.l
diff options
context:
space:
mode:
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r--conf/cf-lex.l14
1 files changed, 11 insertions, 3 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l
index 797dbeac..5959e701 100644
--- a/conf/cf-lex.l
+++ b/conf/cf-lex.l
@@ -9,14 +9,14 @@
%{
#undef REJECT /* Avoid name clashes */
-#include "filter/filter.h"
-
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "nest/bird.h"
+#include "nest/route.h"
+#include "filter/filter.h"
#include "conf/conf.h"
#include "conf/cf-parse.tab.h"
@@ -119,7 +119,15 @@ WHITE [ \t]
while (k)
{
if (!strcmp(k->name, yytext))
- return k->value;
+ {
+ if (k->value > 0)
+ return k->value;
+ else
+ {
+ cf_lval.i = -k->value;
+ return ENUM;
+ }
+ }
k=k->next;
}
cf_lval.s = cf_find_sym(yytext, h);