diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2012-04-21 21:05:36 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2012-04-21 21:05:36 +0200 |
commit | 7d0a31deed92971e274aa0314e12619f93c850c9 (patch) | |
tree | dbd019cd9ffb61c38c3d6e254bc77dae9f58db29 /nest/rt-table.c | |
parent | 334a0ed24d015e106558cc9eeef301c6f0d21aec (diff) |
Fixes in generalized import limits.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index 6a28fd43..6d82e1d3 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -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) |