Adds rate limiting to some log messages.
This commit is contained in:
parent
64534ea2f4
commit
548c329cde
1 changed files with 4 additions and 2 deletions
|
@ -636,6 +636,7 @@ rte_recalculate(struct announce_hook *ah, net *net, rte *new, ea_list *tmpa, str
|
||||||
struct proto *p = ah->proto;
|
struct proto *p = ah->proto;
|
||||||
struct rtable *table = ah->table;
|
struct rtable *table = ah->table;
|
||||||
struct proto_stats *stats = ah->stats;
|
struct proto_stats *stats = ah->stats;
|
||||||
|
static struct rate_limit rl_pipe;
|
||||||
rte *before_old = NULL;
|
rte *before_old = NULL;
|
||||||
rte *old_best = net->routes;
|
rte *old_best = net->routes;
|
||||||
rte *old = NULL;
|
rte *old = NULL;
|
||||||
|
@ -659,7 +660,7 @@ rte_recalculate(struct announce_hook *ah, net *net, rte *new, ea_list *tmpa, str
|
||||||
{
|
{
|
||||||
if (new)
|
if (new)
|
||||||
{
|
{
|
||||||
log(L_ERR "Pipe collision detected when sending %I/%d to table %s",
|
log_rl(&rl_pipe, L_ERR "Pipe collision detected when sending %I/%d to table %s",
|
||||||
net->n.prefix, net->n.pxlen, table->name);
|
net->n.prefix, net->n.pxlen, table->name);
|
||||||
rte_free_quick(new);
|
rte_free_quick(new);
|
||||||
}
|
}
|
||||||
|
@ -1271,6 +1272,7 @@ rt_init(void)
|
||||||
static inline int
|
static inline int
|
||||||
rt_prune_step(rtable *tab, int step, int *max_feed)
|
rt_prune_step(rtable *tab, int step, int *max_feed)
|
||||||
{
|
{
|
||||||
|
static struct rate_limit rl_flush;
|
||||||
struct fib_iterator *fit = &tab->prune_fit;
|
struct fib_iterator *fit = &tab->prune_fit;
|
||||||
|
|
||||||
DBG("Pruning route table %s\n", tab->name);
|
DBG("Pruning route table %s\n", tab->name);
|
||||||
|
@ -1305,7 +1307,7 @@ again:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (step)
|
if (step)
|
||||||
log(L_WARN "Route %I/%d from %s still in %s after flush",
|
log_rl(&rl_flush, L_WARN "Route %I/%d from %s still in %s after flush",
|
||||||
n->n.prefix, n->n.pxlen, e->attrs->proto->name, tab->name);
|
n->n.prefix, n->n.pxlen, e->attrs->proto->name, tab->name);
|
||||||
|
|
||||||
rte_discard(tab, e);
|
rte_discard(tab, e);
|
||||||
|
|
Loading…
Reference in a new issue