summaryrefslogtreecommitdiff
path: root/filter/f-util.c
diff options
context:
space:
mode:
authorPavel Tvrdík <pawel.tvrdik@gmail.com>2016-01-20 15:38:37 +0100
committerPavel Tvrdík <pawel.tvrdik@gmail.com>2016-01-20 16:46:58 +0100
commit0264ccf6f4acaea5313dee2cd3bc3bdb28c74f60 (patch)
treeea9267e1209f85c51a266bb8950edff418586b58 /filter/f-util.c
parentcb1bd816db5b69acb8c6f72211d13f987a494304 (diff)
Rewrite roa_check() for integrated BIRD
Thanks to Ondrej Zajicek for his support with writing this code.
Diffstat (limited to 'filter/f-util.c')
-rw-r--r--filter/f-util.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/filter/f-util.c b/filter/f-util.c
index 7311a56e..661941ec 100644
--- a/filter/f-util.c
+++ b/filter/f-util.c
@@ -54,9 +54,8 @@ f_generate_complex(int operation, int operation_aux, struct f_inst *dyn, struct
return set_dyn;
}
-#if 0
struct f_inst *
-f_generate_roa_check(struct symbol *sym, struct f_inst *prefix, struct f_inst *asn)
+f_generate_roa_check(struct rtable_config *table, struct f_inst *prefix, struct f_inst *asn)
{
struct f_inst_roa_check *ret = cfg_allocz(sizeof(struct f_inst_roa_check));
ret->i.code = P('R','C');
@@ -65,13 +64,12 @@ f_generate_roa_check(struct symbol *sym, struct f_inst *prefix, struct f_inst *a
ret->i.arg2 = asn;
/* prefix == NULL <-> asn == NULL */
- if ((sym->class != SYM_ROA) || ! sym->def)
- cf_error("%s is not a ROA table", sym->name);
- ret->rtc = sym->def;
+ if (table->addr_type != NET_ROA4 && table->addr_type != NET_ROA6)
+ cf_error("%s is not a ROA table", table->name);
+ ret->rtc = table;
return &ret->i;
}
-#endif
char *
filter_name(struct filter *filter)