1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Allows to define constants of all filter types.

This commit is contained in:
Ondrej Zajicek
2013-07-25 22:33:57 +02:00
parent ac57451348
commit 1103b32e83
6 changed files with 62 additions and 71 deletions

View File

@@ -97,9 +97,10 @@ static inline void
add_num_const(char *name, int val)
{
struct symbol *s = cf_find_symbol(name);
s->class = SYM_NUMBER;
s->def = NULL;
s->aux = val;
s->class = SYM_CONSTANT | T_INT;
s->def = cfg_allocz(sizeof(struct f_val));
SYM_TYPE(s) = T_INT;
SYM_VAL(s).i = val;
}
/* the code of read_iproute_table() is based on