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

Fixed channel export map confusion

This commit is contained in:
Maria Matejka 2021-11-23 11:12:32 +00:00
parent 44dbedbe3f
commit 4ba991f19c
2 changed files with 4 additions and 9 deletions

View File

@ -596,6 +596,9 @@ channel_export_stopped(struct rt_export_request *req)
mb_free(c->out_req.name); mb_free(c->out_req.name);
c->out_req.name = NULL; c->out_req.name = NULL;
bmap_free(&c->export_map);
bmap_free(&c->export_reject_map);
if (c->restart_export) if (c->restart_export)
{ {
c->restart_export = 0; c->restart_export = 0;
@ -993,9 +996,6 @@ channel_do_pause(struct channel *c)
} }
channel_roa_unsubscribe_all(c); channel_roa_unsubscribe_all(c);
bmap_free(&c->export_map);
bmap_free(&c->export_reject_map);
} }
static void static void
@ -1035,16 +1035,11 @@ channel_do_down(struct channel *c)
c->proto->active_channels--; c->proto->active_channels--;
// bmap_free(&c->export_map);
memset(&c->import_stats, 0, sizeof(struct channel_import_stats)); memset(&c->import_stats, 0, sizeof(struct channel_import_stats));
memset(&c->export_stats, 0, sizeof(struct channel_export_stats)); memset(&c->export_stats, 0, sizeof(struct channel_export_stats));
CALL(c->channel->cleanup, c); CALL(c->channel->cleanup, c);
/* This have to be done in here, as channel pool is freed before channel_do_down() */
bmap_free(&c->export_map);
bmap_free(&c->export_reject_map);
/* Schedule protocol shutddown */ /* Schedule protocol shutddown */
if (proto_is_done(c->proto)) if (proto_is_done(c->proto))
proto_send_event(c->proto); proto_send_event(c->proto);

View File

@ -507,7 +507,7 @@ export_filter_(struct channel *c, rte *rt, linpool *pool, int silent)
stats->updates_rejected++; stats->updates_rejected++;
if (v == RIC_REJECT) if (v == RIC_REJECT)
channel_rte_trace_out(D_FILTERS, c, rt, "rejected by protocol"); channel_rte_trace_out(D_FILTERS, c, rt, "rejected by protocol");
goto reject_noset; goto reject;
} }
if (v > 0) if (v > 0)