diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2014-10-02 11:41:34 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2014-10-02 12:52:50 +0200 |
commit | 1123e707400984108f48ac7c1be559f7ed8d9306 (patch) | |
tree | f303a7df3d685d3c7886fbf30cb43a4288341fde /filter | |
parent | dcde7ae597ccb7d81648b9ecab7c0f61c88e60f2 (diff) |
Implements token bucket filter for rate limiting.
Diffstat (limited to 'filter')
-rw-r--r-- | filter/filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/filter.c b/filter/filter.c index 88763302..63c2cd86 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -493,7 +493,7 @@ f_rta_cow(void) } } -static struct rate_limit rl_runtime_err; +static struct tbf rl_runtime_err = TBF_DEFAULT_LOG_LIMITS; #define runtime(x) do { \ log_rl(&rl_runtime_err, L_ERR "filters, line %d: %s", what->lineno, x); \ @@ -1492,7 +1492,7 @@ f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struc if (res.type != T_RETURN) { - log( L_ERR "Filter %s did not return accept nor reject. Make up your mind", filter->name); + log_rl(&rl_runtime_err, L_ERR "Filter %s did not return accept nor reject. Make up your mind", filter->name); return F_ERROR; } DBG( "done (%u)\n", res.val.i ); |