summaryrefslogtreecommitdiff
path: root/filter/f-util.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-03-18 17:32:30 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2012-03-18 17:32:30 +0100
commitaf582c4811175d9a27ed5d08a4f6d5eaa69ecec7 (patch)
tree3b2793cb9db3c67efddfb379e6c8adc16b143604 /filter/f-util.c
parentfd087589f80a435a42cedb87b917c71363b11860 (diff)
Route Origin Authorization basics.
- ROA tables, which are used as a basic part for RPKI. - Commands for examining and modifying ROA tables. - Filter operators based on ROA tables consistent with RFC 6483.
Diffstat (limited to 'filter/f-util.c')
-rw-r--r--filter/f-util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/filter/f-util.c b/filter/f-util.c
index ec86a4b2..5908ac64 100644
--- a/filter/f-util.c
+++ b/filter/f-util.c
@@ -54,6 +54,24 @@ f_generate_complex(int operation, int operation_aux, struct f_inst *dyn, struct
return set_dyn;
}
+
+struct f_inst *
+f_generate_roa_check(struct symbol *sym, 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');
+ ret->i.lineno = ifs->conf_lino;
+ ret->i.arg1 = prefix;
+ 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;
+
+ return &ret->i;
+}
+
char *
filter_name(struct filter *filter)
{