0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

ROA code switchoff

This commit is contained in:
Jan Moskyto Matejka 2015-12-16 15:30:44 +01:00 committed by Ondrej Zajicek (work)
parent aedd3a6bab
commit 9656dce72e
11 changed files with 18 additions and 16 deletions

View File

@ -674,8 +674,6 @@ cf_symbol_class_name(struct symbol *sym)
return "filter";
case SYM_TABLE:
return "routing table";
case SYM_ROA:
return "ROA table";
default:
return "unknown type";
}

View File

@ -135,7 +135,7 @@ config_parse(struct config *c)
sysdep_preconfig(c);
protos_preconfig(c);
rt_preconfig(c);
roa_preconfig(c);
/* roa_preconfig(c); */
cf_parse();
protos_postconfig(c);
if (EMPTY_LIST(c->protos))
@ -266,7 +266,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);
/* roa_commit(c, old_config); */
DBG("protos_commit\n");
protos_commit(c, old_config, force_restart, type);

View File

@ -121,7 +121,6 @@ struct symbol {
#define SYM_FUNCTION 3
#define SYM_FILTER 4
#define SYM_TABLE 5
#define SYM_ROA 6
#define SYM_VARIABLE 0x100 /* 0x100-0x1ff are variable types */
#define SYM_CONSTANT 0x200 /* 0x200-0x2ff are variable types */

View File

@ -284,7 +284,6 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN,
DEFINED,
ADD, DELETE, CONTAINS, RESET,
PREPEND, FIRST, LAST, MATCH,
ROA_CHECK,
EMPTY,
FILTER, WHERE, EVAL)
@ -761,8 +760,10 @@ term:
| DELETE '(' term ',' term ')' { $$ = f_new_inst(); $$->code = P('C','a'); $$->a1.p = $3; $$->a2.p = $5; $$->aux = 'd'; }
| FILTER '(' term ',' term ')' { $$ = f_new_inst(); $$->code = P('C','a'); $$->a1.p = $3; $$->a2.p = $5; $$->aux = 'f'; }
/*
| ROA_CHECK '(' SYM ')' { $$ = f_generate_roa_check($3, NULL, NULL); }
| ROA_CHECK '(' SYM ',' term ',' term ')' { $$ = f_generate_roa_check($3, $5, $7); }
*/
/* | term '.' LEN { $$->code = P('P','l'); } */

View File

@ -54,7 +54,7 @@ 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)
{
@ -71,6 +71,7 @@ f_generate_roa_check(struct symbol *sym, struct f_inst *prefix, struct f_inst *a
return &ret->i;
}
#endif
char *
filter_name(struct filter *filter)

View File

@ -1245,6 +1245,7 @@ interpret(struct f_inst *what)
break;
#if 0
case P('R','C'): /* ROA Check */
if (what->arg1)
{
@ -1277,6 +1278,7 @@ interpret(struct f_inst *what)
res.val.i = ROA_UNKNOWN;
// XXXX res.val.i = roa_check_net(rtc->table, &v1.val.net, as);
break;
#endif
default:
bug( "Unknown instruction %d (%c)", what->code, what->code & 0xff);
@ -1404,6 +1406,7 @@ i_same(struct f_inst *f1, struct f_inst *f2)
case P('C','a'): TWOARGS; break;
case P('a','f'):
case P('a','l'): ONEARG; break;
#if 0
case P('R','C'):
TWOARGS;
/* Does not really make sense - ROA check resuls may change anyway */
@ -1411,6 +1414,7 @@ i_same(struct f_inst *f1, struct f_inst *f2)
((struct f_inst_roa_check *) f2)->rtc->name))
return 0;
break;
#endif
default:
bug( "Unknown instruction %d in same (%c)", f1->code, f1->code & 0xff);
}

View File

@ -67,7 +67,7 @@ struct f_inst *f_new_inst(void);
struct f_inst *f_new_dynamic_attr(int type, int f_type, int code); /* Type as core knows it, type as filters know it, and code of dynamic attribute */
struct f_tree *f_new_tree(void);
struct f_inst *f_generate_complex(int operation, int operation_aux, struct f_inst *dyn, struct f_inst *argument);
struct f_inst *f_generate_roa_check(struct symbol *sym, struct f_inst *prefix, struct f_inst *asn);
// struct f_inst *f_generate_roa_check(struct symbol *sym, struct f_inst *prefix, struct f_inst *asn);
struct f_tree *build_tree(struct f_tree *);
@ -133,7 +133,7 @@ void val_format(struct f_val v, buffer *buf);
#define T_ENUM_SCOPE 0x32
#define T_ENUM_RTC 0x33
#define T_ENUM_RTD 0x34
#define T_ENUM_ROA 0x35
/*#define T_ENUM_ROA 0x35*/
/* new enums go here */
#define T_ENUM_EMPTY 0x3f /* Special hack for atomic_aggr */

View File

@ -80,7 +80,6 @@ print_size(char *dsc, size_t val)
extern pool *rt_table_pool;
extern pool *rta_pool;
extern pool *roa_pool;
extern pool *proto_pool;
void
@ -89,7 +88,7 @@ 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("ROA tables:", rmemsize(roa_pool));
print_size("Protocols:", rmemsize(proto_pool));
print_size("Total:", rmemsize(&root_pool));
cli_msg(0, "");

View File

@ -19,7 +19,7 @@ CF_DEFINES
static struct proto_config *this_proto;
static struct iface_patt *this_ipatt;
static struct iface_patt_node *this_ipn;
static struct roa_table_config *this_roa_table;
/* static struct roa_table_config *this_roa_table; */
static list *this_p_list;
static struct password_item *this_p_item;
static int password_id;
@ -58,7 +58,7 @@ CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILT
CF_KEYWORDS(IPV4, IPVX, VPN4, VPN6)
CF_KEYWORDS(RECEIVE, LIMIT, ACTION, WARN, BLOCK, RESTART, DISABLE, KEEP, FILTERED)
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES)
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PREEXPORT, NOEXPORT, GENERATE, ROA)
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PREEXPORT, NOEXPORT, GENERATE) /* ,ROA */
CF_KEYWORDS(LISTEN, BGP, V6ONLY, DUAL, ADDRESS, PORT, PASSWORDS, DESCRIPTION, SORTED)
CF_KEYWORDS(RELOAD, IN, OUT, MRTDUMP, MESSAGES, RESTRICT, MEMORY, IGP_METRIC, CLASS, DSCP)
CF_KEYWORDS(GRACEFUL, RESTART, WAIT, MAX, FLUSH, AS)
@ -68,7 +68,6 @@ CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIREC
CF_ENUM(T_ENUM_SCOPE, SCOPE_, HOST, LINK, SITE, ORGANIZATION, UNIVERSE, UNDEFINED)
CF_ENUM(T_ENUM_RTC, RTC_, UNICAST, BROADCAST, MULTICAST, ANYCAST)
CF_ENUM(T_ENUM_RTD, RTD_, ROUTER, DEVICE, BLACKHOLE, UNREACHABLE, PROHIBIT, MULTIPATH)
CF_ENUM(T_ENUM_ROA, ROA_, UNKNOWN, VALID, INVALID)
%type <i32> idval
%type <f> imexport

View File

@ -560,6 +560,7 @@ 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 */
#if 0
/*
* Route Origin Authorization
@ -639,5 +640,5 @@ void roa_preconfig(struct config *c);
void roa_commit(struct config *new, struct config *old);
void roa_show(struct roa_show_data *d);
#endif
#endif

View File

@ -768,7 +768,7 @@ main(int argc, char **argv)
io_init();
rt_init();
if_init();
roa_init();
// roa_init();
config_init();
uid_t use_uid = get_uid(use_user);