summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/filter.c3
-rw-r--r--filter/filter.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/filter/filter.c b/filter/filter.c
index 7dcf22ed..aef4f44a 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -1089,7 +1089,8 @@ interpret(struct f_inst *what)
switch (what->aux & EAF_TYPE_MASK) {
case EAF_TYPE_INT:
- if (v1.type != T_INT)
+ // Enums are also ints, so allow them in.
+ if (v1.type != T_INT && (v1.type < T_ENUM_LO || v1.type > T_ENUM_HI))
runtime( "Setting int attribute to non-int value" );
l->attrs[0].u.data = v1.val.i;
break;
diff --git a/filter/filter.h b/filter/filter.h
index 6c81b9bc..c277b67c 100644
--- a/filter/filter.h
+++ b/filter/filter.h
@@ -147,6 +147,7 @@ void val_format(struct f_val v, buffer *buf);
#define T_ENUM_RTD 0x34
#define T_ENUM_ROA 0x35
#define T_ENUM_NETTYPE 0x36
+#define T_ENUM_RA_PREFERENCE 0x37
/* new enums go here */
#define T_ENUM_EMPTY 0x3f /* Special hack for atomic_aggr */