Commit 650b4189 authored by Pavel Tvrdík's avatar Pavel Tvrdík

Delete old ROA code

parent 0264ccf6
......@@ -135,7 +135,6 @@ 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))
......@@ -266,7 +265,6 @@ 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);
......
......@@ -20,7 +20,6 @@ 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) */
......
......@@ -54,11 +54,9 @@ 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 f_prefix px;
......
......@@ -88,7 +88,6 @@ cmd_show_memory(void)
cli_msg(-1018, "BIRD memory usage");
print_size("Routing tables:", rmemsize(rt_table_pool));
print_size("Route attributes:", rmemsize(rta_pool));
// print_size("ROA tables:", rmemsize(roa_pool));
print_size("Protocols:", rmemsize(proto_pool));
print_size("Total:", rmemsize(&root_pool));
cli_msg(0, "");
......
......@@ -276,7 +276,6 @@ void rt_unlock_table(rtable *);
void rt_setup(pool *, rtable *, char *, struct rtable_config *);
static inline net *net_find(rtable *tab, const net_addr *addr) { return (net *) fib_find(&tab->fib, addr); }
static inline net *net_get(rtable *tab, const net_addr *addr) { return (net *) fib_get(&tab->fib, addr); }
byte net_roa_check(rtable *tab, const net_addr *n, u32 asn);
rte *rte_find(net *net, struct rte_src *src);
rte *rte_get_temp(struct rta *);
......@@ -565,85 +564,14 @@ extern struct protocol *attr_class_to_protocol[EAP_MAX];
#define DEF_PREF_PIPE 70 /* Routes piped from other tables */
#define DEF_PREF_INHERITED 10 /* Routes inherited from other routing daemons */
#define ROA_UNKNOWN 0
#define ROA_VALID 1
#define ROA_INVALID 2
#if 0
/*
* Route Origin Authorization
*/
struct roa_item {
u32 asn;
byte maxlen;
byte src;
struct roa_item *next;
};
struct roa_node {
struct fib_node n;
struct roa_item *items;
// u32 cached_asn;
};
struct roa_table {
node n; /* Node in roa_table_list */
struct fib fib;
char *name; /* Name of this ROA table */
struct roa_table_config *cf; /* Configuration of this ROA table */
};
struct roa_item_config {
ip_addr prefix;
byte pxlen, maxlen;
u32 asn;
struct roa_item_config *next;
};
struct roa_table_config {
node n; /* Node in config->rpa_tables */
char *name; /* Name of this ROA table */
struct roa_table *table;
struct roa_item_config *roa_items; /* Preconfigured ROA items */
// char *filename;
// int gc_max_ops; /* Maximum number of operations before GC is run */
// int gc_min_time; /* Minimum time between two consecutive GC runs */
};
struct roa_show_data {
struct fib_iterator fit;
struct roa_table *table;
ip_addr prefix;
byte pxlen;
byte mode; /* ROA_SHOW_* values */
u32 asn; /* Filter ASN, 0 -> all */
};
#define ROA_SRC_ANY 0
#define ROA_SRC_CONFIG 1
#define ROA_SRC_DYNAMIC 2
#define ROA_SHOW_ALL 0
#define ROA_SHOW_PX 1
#define ROA_SHOW_IN 2
#define ROA_SHOW_FOR 3
extern struct roa_table *roa_table_default;
#define ROA_UNKNOWN 0
#define ROA_VALID 1
#define ROA_INVALID 2
void roa_add_item(struct roa_table *t, ip_addr prefix, byte pxlen, byte maxlen, u32 asn, byte src);
void roa_delete_item(struct roa_table *t, ip_addr prefix, byte pxlen, byte maxlen, u32 asn, byte src);
void roa_flush(struct roa_table *t, byte src);
byte roa_check(struct roa_table *t, ip_addr prefix, byte pxlen, u32 asn);
struct roa_table_config * roa_new_table_config(struct symbol *s);
void roa_add_item_config(struct roa_table_config *rtc, ip_addr prefix, byte pxlen, byte maxlen, u32 asn);
void roa_init(void);
void roa_preconfig(struct config *c);
void roa_commit(struct config *new, struct config *old);
void roa_show(struct roa_show_data *d);
byte net_roa_check(rtable *tab, const net_addr *n, u32 asn);
#endif
#endif
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment