From af582c4811175d9a27ed5d08a4f6d5eaa69ecec7 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 18 Mar 2012 17:32:30 +0100 Subject: 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. --- conf/cf-lex.l | 2 ++ conf/conf.c | 2 ++ conf/conf.h | 3 +++ conf/confbase.Y | 2 ++ 4 files changed, 9 insertions(+) (limited to 'conf') diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 408fa93a..8cd52c42 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -536,6 +536,8 @@ cf_symbol_class_name(struct symbol *sym) return "network address"; case SYM_TEMPLATE: return "protocol template"; + case SYM_ROA: + return "ROA table"; default: return "unknown type"; } diff --git a/conf/conf.c b/conf/conf.c index 4b605b36..13049be4 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -112,6 +112,7 @@ config_parse(struct config *c) sysdep_preconfig(c); protos_preconfig(c); rt_preconfig(c); + roa_preconfig(c); cf_parse(); protos_postconfig(c); if (EMPTY_LIST(c->protos)) @@ -210,6 +211,7 @@ config_do_commit(struct config *c, int type) force_restart |= global_commit(c, old_config); DBG("rt_commit\n"); rt_commit(c, old_config); + roa_commit(c, old_config); DBG("protos_commit\n"); protos_commit(c, old_config, force_restart, type); new_config = NULL; /* Just to be sure nobody uses that now */ diff --git a/conf/conf.h b/conf/conf.h index 8753bafe..b4ec3157 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -21,7 +21,9 @@ struct config { linpool *mem; /* Linear pool containing configuration data */ list protos; /* Configured protocol instances (struct proto_config) */ list tables; /* Configured routing tables (struct rtable_config) */ + list roa_tables; /* Configured ROA tables (struct roa_table_config) */ list logfiles; /* Configured log fils (sysdep) */ + int mrtdump_file; /* Configured MRTDump file (sysdep, fd in unix) */ char *syslog_name; /* Name used for syslog (NULL -> no syslog) */ struct rtable_config *master_rtc; /* Configuration of master routing table */ @@ -110,6 +112,7 @@ struct symbol { #define SYM_TABLE 5 #define SYM_IPA 6 #define SYM_TEMPLATE 7 +#define SYM_ROA 8 #define SYM_VARIABLE 0x100 /* 0x100-0x1ff are variable types */ diff --git a/conf/confbase.Y b/conf/confbase.Y index b9bc048e..dcb0719f 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -50,9 +50,11 @@ CF_DECLS struct f_path_mask *h; struct password_item *p; struct rt_show_data *ra; + struct roa_show_data *ro; struct sym_show_data *sd; struct lsadb_show_data *ld; struct iface *iface; + struct roa_table *rot; void *g; bird_clock_t time; struct prefix px; -- cgit v1.2.3