path: root/src/evaluate.c
diff options
authorFlorian Westphal <>2018-05-02 14:50:12 +0200
committerFlorian Westphal <>2018-05-02 16:43:38 +0200
commit2cced3146918163c383432fa40488280f3f87371 (patch)
treed60efb1a96f3dbbc5f33eb6bfb4da67755ea2070 /src/evaluate.c
parenta502ba00e44a03cbce9b5769274e1b604d3f08ad (diff)
meter: enforce presence of a max size
meters are updated dynamically, so we don't know in advance how large this structure can be. Add a 'size' keyword to specifiy an upper limit and update the old syntax to assume a default max value of 65535. Signed-off-by: Florian Westphal <>
Diffstat (limited to 'src/evaluate.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index 4384e271..55e6ad1e 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -1995,6 +1995,7 @@ static int stmt_evaluate_meter(struct eval_ctx *ctx, struct stmt *stmt)
setref = implicit_set_declaration(ctx, stmt->, key, set);
+ setref->set->desc.size = stmt->meter.size;
stmt->meter.set = setref;
if (stmt_evaluate(ctx, stmt->meter.stmt) < 0)