diff options
Diffstat (limited to 'filter')
-rw-r--r-- | filter/filter.h | 3 | ||||
-rw-r--r-- | filter/trie.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/filter/filter.h b/filter/filter.h index 2277f519..62bad84c 100644 --- a/filter/filter.h +++ b/filter/filter.h @@ -81,10 +81,13 @@ struct rte; int f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struct linpool *tmp_pool, int flags); int f_eval_int(struct f_inst *expr); +u32 f_eval_asn(struct f_inst *expr); + char *filter_name(struct filter *filter); int filter_same(struct filter *new, struct filter *old); int i_same(struct f_inst *f1, struct f_inst *f2); +void f_prefix_get_bounds(struct f_prefix *px, int *l, int *h); int val_compare(struct f_val v1, struct f_val v2); void val_print(struct f_val v); diff --git a/filter/trie.c b/filter/trie.c index ffb9b99f..fb405ded 100644 --- a/filter/trie.c +++ b/filter/trie.c @@ -70,6 +70,7 @@ */ #include "nest/bird.h" +#include "lib/string.h" #include "conf/conf.h" #include "filter/filter.h" @@ -177,7 +178,6 @@ trie_add_prefix(struct f_trie *t, struct f_prefix *px) { int l, h; int plen = px->len & LEN_MASK; - ip_addr pmask = ipa_mkmask(plen); /* 'l' and 'h' are lower and upper bounds on accepted prefix lengths, both inclusive. 0 <= l, h <= 32 */ @@ -272,7 +272,7 @@ static int trie_node_print(struct f_trie_node *t, char *buf, int blen) { if (t == NULL) - return; + return 0; int old_blen = blen; int wb = 0; // bsnprintf(buf, blen, "%I/%d accept %I\n", t->addr, t->plen, t->accept); |