mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Export: More strict export state checking on change
This commit is contained in:
@@ -1981,7 +1981,7 @@ bgp_out_table_feed(void *data)
|
||||
if (hook->hash_iter)
|
||||
ev_schedule_work(&hook->h.event);
|
||||
else
|
||||
rt_set_export_state(&hook->h, TES_READY);
|
||||
rt_set_export_state(&hook->h, BIT32_ALL(TES_FEEDING), TES_READY);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1996,6 +1996,13 @@ bgp_out_table_export_start(struct rt_exporter *re, struct rt_export_request *req
|
||||
rt_init_export(re, req->hook);
|
||||
}
|
||||
|
||||
static void
|
||||
bgp_out_table_export_stop(struct rt_export_hook *hook)
|
||||
{
|
||||
rt_set_export_state(hook, BIT32_ALL(TES_HUNGRY, TES_FEEDING, TES_READY), TES_STOP);
|
||||
rt_stop_export_common(hook);
|
||||
}
|
||||
|
||||
static void
|
||||
bgp_out_table_export_done(void *data)
|
||||
{
|
||||
@@ -2009,6 +2016,7 @@ bgp_out_table_export_done(void *data)
|
||||
|
||||
static const struct rt_exporter_class bgp_out_table_export_class = {
|
||||
.start = bgp_out_table_export_start,
|
||||
.stop = bgp_out_table_export_stop,
|
||||
.done = bgp_out_table_export_done,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user