aboutsummaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-07-11 13:04:01 +0200
committerMaria Matejka <mq@ucw.cz>2022-07-11 13:04:01 +0200
commitb5c8fce284a2bb529aee6ff201fe044f09a0e418 (patch)
treeaf045684e86c6e15019075409f30330dc59ba814 /nest
parent2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f (diff)
downloadbird-b5c8fce284a2bb529aee6ff201fe044f09a0e418.tar.gz
Added forgotten route source locking in flowspec validation
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-table.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 97bbc4f0..4500c888 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -2674,7 +2674,7 @@ static rte *
rt_flowspec_update_rte(rtable *tab, rte *r)
{
#ifdef CONFIG_BGP
- if (r->attrs->source != RTS_BGP)
+ if ((r->attrs->source != RTS_BGP) || (r->sender->proto != r->src->proto))
return NULL;
struct bgp_channel *bc = (struct bgp_channel *) r->sender;
@@ -2697,6 +2697,7 @@ rt_flowspec_update_rte(rtable *tab, rte *r)
rte *new = sl_alloc(rte_slab);
memcpy(new, r, sizeof(rte));
new->attrs = rta_lookup(a);
+ rt_lock_source(new->src);
return new;
#else