diff options
author | Maria Matejka <mq@ucw.cz> | 2022-02-11 22:29:13 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-03-09 11:27:34 +0100 |
commit | 8a4bc4fdbf2f4c6ccaa684c922779ddc11489e68 (patch) | |
tree | f763a7e90fea42a258b3b7d998aba754f1fa8551 /nest/rt-table.c | |
parent | 24773af9e099530aa6ccf4c730ad31c452284228 (diff) |
BGP Flowspec validation: Removed in-route optimization for multithreading compatibility
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index a5a8c421..e81adf91 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -2831,12 +2831,16 @@ static rte * rt_flowspec_update_rte(rtable *tab, rte *r) { #ifdef CONFIG_BGP - if ((r->attrs->source != RTS_BGP) || !r->u.bgp.base_table) + if (r->attrs->source != RTS_BGP) + return NULL; + + struct bgp_channel *bc = (struct bgp_channel *) r->sender; + if (!bc->base_table) return NULL; const net_addr *n = r->net->n.addr; struct bgp_proto *p = (void *) r->src->proto; - int valid = rt_flowspec_check(r->u.bgp.base_table, tab, n, r->attrs, p->is_interior); + int valid = rt_flowspec_check(bc->base_table, tab, n, r->attrs, p->is_interior); int dest = valid ? RTD_NONE : RTD_UNREACHABLE; if (dest == r->attrs->dest) |