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 | |
parent | 24773af9e099530aa6ccf4c730ad31c452284228 (diff) |
BGP Flowspec validation: Removed in-route optimization for multithreading compatibility
Diffstat (limited to 'nest')
-rw-r--r-- | nest/route.h | 1 | ||||
-rw-r--r-- | nest/rt-table.c | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/nest/route.h b/nest/route.h index 9fd3bdcc..d0237a37 100644 --- a/nest/route.h +++ b/nest/route.h @@ -267,7 +267,6 @@ typedef struct rte { struct { u8 suppressed; /* Used for deterministic MED comparison */ s8 stale; /* Route is LLGR_STALE, -1 if unknown */ - struct rtable *base_table; /* Base table for Flowspec validation */ } bgp; #endif } u; 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) |