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

fixup! fixup! fixup! fixup! fixup! partial import seems working

This commit is contained in:
Katerina Kubecova 2023-11-02 10:04:35 +01:00
parent 723092115f
commit 0403f0608b
6 changed files with 17 additions and 25 deletions

View File

@ -128,7 +128,8 @@ proto_call_cmd_reload(struct proto_spec ps, int dir, const struct f_trie *trie)
if (trie)
{
/* CLI linpool is moved to trie, because trie is need for longer time
than the linpool would exist in CLI. The linpool is freed in channel_reload_out_done_main */
* than the linpool would exist in CLI. The linpool is freed in channel_reload_out_done_main.
*/
ASSERT_DIE(this_cli->parser_pool == prr->trie->lp);
rmove(this_cli->parser_pool, &root_pool);
this_cli->parser_pool = lp_new(this_cli->pool);

View File

@ -1569,21 +1569,17 @@ bgp_reload_routes(struct channel *C, struct channel_import_request *cir)
/* Ignore non-BGP channels */
if (C->class != &channel_bgp)
{
if (cir)
cir->done(cir);
cir->done(cir);
return 1;
}
if (cir)
if (cir->trie)
{
if (cir->trie)
{
cir->done(cir);
return 0;
}
/* We do not need cir anymore and later we will not be able to detect when to free it. */
cir->done(cir);
return 0;
}
/* We do not need cir anymore and later we will not be able to detect when to free it. */
cir->done(cir);
ASSERT(p->conn && p->route_refresh);
bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH);

View File

@ -436,10 +436,9 @@ static int
ospf_reload_routes(struct channel *C, struct channel_import_request *cir)
{
struct ospf_proto *p = (struct ospf_proto *) C->proto;
if (cir) {
cir->next = p->cir;
p->cir = cir;
}
cir->next = p->cir;
p->cir = cir;
if (p->calcrt == 2)
return 1;

View File

@ -121,8 +121,7 @@ pipe_reload_routes(struct channel *C, struct channel_import_request *cir)
channel_request_feeding((C == p->pri) ? p->sec : p->pri, &reload->cfr);
}
else{
if(cir)
cir->done(cir);
cir->done(cir);
/* Route reload on one channel is just refeed on the other */
channel_request_feeding_dynamic((C == p->pri) ? p->sec : p->pri, CFRT_DIRECT);
}

View File

@ -1166,10 +1166,10 @@ static int
rip_reload_routes(struct channel *C, struct channel_import_request *cir)
{
struct rip_proto *p = (struct rip_proto *) C->proto;
if (cir) {
cir->next = p->cir;
p->cir = cir;
}
cir->next = p->cir;
p->cir = cir;
if (p->rt_reload)
return 1;

View File

@ -421,14 +421,11 @@ static_reload_routes(struct channel *C, struct channel_import_request *cir)
TRACE(D_EVENTS, "Scheduling route reload");
if (cir && cir->trie)
if (cir->trie)
static_mark_partial(p, cir);
else
{
if (cir)
cir->done(cir);
static_mark_all(p);
}
return 1;
}