summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2020-03-09 15:31:10 +0100
committerMaria Matejka <mq@ucw.cz>2021-11-09 19:20:41 +0100
commit8f3942a97e16370f5c22e9c39ddbfe63b38bd5ce (patch)
tree991563705788b01b2bcb4ef83f53f40229b08109 /nest/proto.c
parentc56752e4367733c03a05e65ba62ccd2e54f7aadd (diff)
Route export: rejected by filter bitmap
If a route has been rejected by filter, store that information to avoid repeated export filter runs on rejected routes.
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 631e4b60..c7e25209 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -463,6 +463,7 @@ channel_stop_export(struct channel *c)
c->export_state = ES_DOWN;
c->export_stats.routes = 0;
bmap_reset(&c->export_map, 1024);
+ bmap_reset(&c->export_reject_map, 1024);
}
@@ -551,6 +552,7 @@ channel_do_start(struct channel *c)
c->feed_event = ev_new_init(c->proto->pool, channel_feed_loop, c);
bmap_init(&c->export_map, c->proto->pool, 1024);
+ bmap_init(&c->export_reject_map, c->proto->pool, 1024);
memset(&c->export_stats, 0, sizeof(struct export_stats));
memset(&c->import_stats, 0, sizeof(struct import_stats));
@@ -585,6 +587,7 @@ channel_do_flush(struct channel *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);
c->in_table = NULL;
c->reload_event = NULL;
c->out_table = NULL;