diff options
author | Maria Matejka <mq@ucw.cz> | 2023-03-08 13:44:18 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-04 17:00:58 +0200 |
commit | 90de93ca0336b95038dddaef276d0c7ae5b7bbff (patch) | |
tree | 82dfda0d44cb5b84fa46762c0bf0104859a84b16 /nest/proto.c | |
parent | 97d2875e999487bfe91f16c77c409ac0080541d3 (diff) |
Fixed unwanted reloads while reconfiguring protocols with import table on
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nest/proto.c b/nest/proto.c index 6c6d4ed3..3a8c938e 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -690,7 +690,7 @@ channel_reload_dump_req(struct rt_export_request *req) void channel_reload_export_bulk(struct rt_export_request *req, const net_addr *net, struct rt_pending_export *rpe, rte **feed, uint count); /* Called by protocol to activate in_table */ -void +static void channel_setup_in_table(struct channel *c) { c->reload_req = (struct rt_export_request) { @@ -701,8 +701,6 @@ channel_setup_in_table(struct channel *c) .dump_req = channel_reload_dump_req, .log_state_change = channel_reload_log_state_change, }; - - c->in_keep |= RIK_PREFILTER; } @@ -711,6 +709,9 @@ channel_do_start(struct channel *c) { c->proto->active_channels++; + if ((c->in_keep & RIK_PREFILTER) == RIK_PREFILTER) + channel_setup_in_table(c); + CALL(c->channel->start, c); channel_start_import(c); @@ -882,7 +883,7 @@ channel_request_reload(struct channel *c) CD(c, "Reload requested"); - if (c->in_keep & RIK_PREFILTER) + if ((c->in_keep & RIK_PREFILTER) == RIK_PREFILTER) channel_schedule_reload(c); else c->proto->reload_routes(c); |