1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Merge commit 'f0507f05ce57398e135651896dace4cb68eeed54' into thread-next

This commit is contained in:
Maria Matejka
2022-08-02 22:08:59 +02:00
21 changed files with 336 additions and 111 deletions

View File

@@ -314,6 +314,7 @@ krt_learn_scan(struct krt_proto *p, rte *e)
ea_set_attr_u32(&e0.attrs, &ea_gen_preference, 0, p->p.main_channel->preference);
rte_update(p->p.main_channel, e->net, &e0, e0.src);
rt_unlock_source(e0.src);
}
static void
@@ -322,9 +323,9 @@ krt_learn_async(struct krt_proto *p, rte *e, int new)
if (new)
return krt_learn_scan(p, e);
struct rte_src *src = rt_find_source(&p->p, krt_metric(e));
if (src)
rte_update(p->p.main_channel, e->net, NULL, src);
struct rte_src *src = rt_get_source(&p->p, krt_metric(e));
rte_update(p->p.main_channel, e->net, NULL, src);
rt_unlock_source(src);
}
#endif
@@ -683,7 +684,7 @@ krt_scan_timer_kick(struct krt_proto *p)
static int
krt_preexport(struct channel *C, rte *e)
{
if (e->src->proto == C->proto)
if (e->src->owner == &C->proto->sources)
return -1;
if (!krt_capable(e))