0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +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) if (trie)
{ {
/* CLI linpool is moved to trie, because trie is need for longer time /* 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); ASSERT_DIE(this_cli->parser_pool == prr->trie->lp);
rmove(this_cli->parser_pool, &root_pool); rmove(this_cli->parser_pool, &root_pool);
this_cli->parser_pool = lp_new(this_cli->pool); this_cli->parser_pool = lp_new(this_cli->pool);

View File

@ -1569,13 +1569,10 @@ bgp_reload_routes(struct channel *C, struct channel_import_request *cir)
/* Ignore non-BGP channels */ /* Ignore non-BGP channels */
if (C->class != &channel_bgp) if (C->class != &channel_bgp)
{ {
if (cir)
cir->done(cir); cir->done(cir);
return 1; return 1;
} }
if (cir)
{
if (cir->trie) if (cir->trie)
{ {
cir->done(cir); cir->done(cir);
@ -1583,7 +1580,6 @@ bgp_reload_routes(struct channel *C, struct channel_import_request *cir)
} }
/* We do not need cir anymore and later we will not be able to detect when to free it. */ /* We do not need cir anymore and later we will not be able to detect when to free it. */
cir->done(cir); cir->done(cir);
}
ASSERT(p->conn && p->route_refresh); ASSERT(p->conn && p->route_refresh);
bgp_schedule_packet(p->conn, c, PKT_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) ospf_reload_routes(struct channel *C, struct channel_import_request *cir)
{ {
struct ospf_proto *p = (struct ospf_proto *) C->proto; struct ospf_proto *p = (struct ospf_proto *) C->proto;
if (cir) {
cir->next = p->cir; cir->next = p->cir;
p->cir = cir; p->cir = cir;
}
if (p->calcrt == 2) if (p->calcrt == 2)
return 1; return 1;

View File

@ -121,7 +121,6 @@ pipe_reload_routes(struct channel *C, struct channel_import_request *cir)
channel_request_feeding((C == p->pri) ? p->sec : p->pri, &reload->cfr); channel_request_feeding((C == p->pri) ? p->sec : p->pri, &reload->cfr);
} }
else{ else{
if(cir)
cir->done(cir); cir->done(cir);
/* Route reload on one channel is just refeed on the other */ /* Route reload on one channel is just refeed on the other */
channel_request_feeding_dynamic((C == p->pri) ? p->sec : p->pri, CFRT_DIRECT); 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) rip_reload_routes(struct channel *C, struct channel_import_request *cir)
{ {
struct rip_proto *p = (struct rip_proto *) C->proto; struct rip_proto *p = (struct rip_proto *) C->proto;
if (cir) {
cir->next = p->cir; cir->next = p->cir;
p->cir = cir; p->cir = cir;
}
if (p->rt_reload) if (p->rt_reload)
return 1; 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"); TRACE(D_EVENTS, "Scheduling route reload");
if (cir && cir->trie) if (cir->trie)
static_mark_partial(p, cir); static_mark_partial(p, cir);
else else
{
if (cir)
cir->done(cir);
static_mark_all(p); static_mark_all(p);
}
return 1; return 1;
} }