mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
filter: Allow assigning enums into extended attributes
They are internally ints, but they got refused as a wrong type. This fixes setting of the BGP origin and is also needed for RA.
This commit is contained in:
parent
cd1d99611e
commit
5a8b1fb047
@ -1088,7 +1088,8 @@ interpret(struct f_inst *what)
|
|||||||
|
|
||||||
switch (what->aux & EAF_TYPE_MASK) {
|
switch (what->aux & EAF_TYPE_MASK) {
|
||||||
case EAF_TYPE_INT:
|
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" );
|
runtime( "Setting int attribute to non-int value" );
|
||||||
l->attrs[0].u.data = v1.val.i;
|
l->attrs[0].u.data = v1.val.i;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user