diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-07 21:54:47 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-07 21:54:47 +0100 |
commit | 830ba75e6dd369c3e64d122f0537cc85211e56e6 (patch) | |
tree | 23989d7955618540ab2bad467d6e376229ad922c /filter | |
parent | 46434a3cad99260b5a659e5df874eab4615bcb36 (diff) | |
parent | 1e8721e2aeccfbc3f533e8b8abc07582cee77e9a (diff) |
Merge commit '1e8721e2aeccfbc3f533e8b8abc07582cee77e9a' into int-new
Diffstat (limited to 'filter')
-rw-r--r-- | filter/filter.c | 3 | ||||
-rw-r--r-- | filter/filter.h | 1 |
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 */ |