1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Fixes in generalized import limits.

This commit is contained in:
Ondrej Zajicek
2012-04-21 21:05:36 +02:00
parent 334a0ed24d
commit 7d0a31deed
6 changed files with 54 additions and 35 deletions

View File

@@ -485,12 +485,18 @@ rte_recalculate(struct announce_hook *ah, net *net, rte *new, ea_list *tmpa, str
}
struct proto_limit *l = ah->in_limit;
if (l && !old && new && (stats->imp_routes >= l->limit) && proto_notify_limit(ah, l))
if (l && !old && new)
{
stats->imp_updates_ignored++;
rte_trace_in(D_FILTERS, p, new, "ignored [limit]");
rte_free_quick(new);
return;
if (stats->imp_routes >= l->limit)
proto_notify_limit(ah, l, stats->imp_routes);
if (l->state == PLS_BLOCKED)
{
stats->imp_updates_ignored++;
rte_trace_in(D_FILTERS, p, new, "ignored [limit]");
rte_free_quick(new);
return;
}
}
if (new)