mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Kick settle timer when receiving updates in rt_notify()
This commit is contained in:
parent
701a9f5dd1
commit
4243f9db12
@ -1317,10 +1317,22 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
|
||||
if (p->p.proto_state != PS_UP)
|
||||
return;
|
||||
|
||||
if (!p->root)
|
||||
trie_init(p);
|
||||
if (PREFIX_AGGR == p->aggr_mode)
|
||||
{
|
||||
assert(p->root == NULL);
|
||||
|
||||
channel_request_feeding(p->src);
|
||||
/*
|
||||
* Don't kick settle timer during first run. That would cause
|
||||
* repeated calls to rt_notify() without any new updates.
|
||||
*/
|
||||
if (!p->first_run)
|
||||
{
|
||||
log("rt notify: kick");
|
||||
settle_kick(&p->notify_settle);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Find the objects for the old route */
|
||||
if (old)
|
||||
@ -1501,9 +1513,6 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
|
||||
ASSERT_DIE(!old_bucket->rte && !old_bucket->count);
|
||||
HASH_REMOVE2(p->buckets, AGGR_BUCK, p->p.pool, old_bucket);
|
||||
}
|
||||
|
||||
assert(p->root != NULL);
|
||||
settle_kick(&p->notify_settle);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -81,7 +81,6 @@ struct aggregator_proto {
|
||||
struct settle notify_settle;
|
||||
int before_count;
|
||||
int after_count;
|
||||
int aggr_done;
|
||||
};
|
||||
|
||||
enum aggr_item_type {
|
||||
|
Loading…
Reference in New Issue
Block a user