From 2cced3146918163c383432fa40488280f3f87371 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 2 May 2018 14:50:12 +0200 Subject: 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 --- src/statement.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/statement.c') diff --git a/src/statement.c b/src/statement.c index fccf71c1..19c30cf8 100644 --- a/src/statement.c +++ b/src/statement.c @@ -114,7 +114,7 @@ static void meter_stmt_print(const struct stmt *stmt, struct output_ctx *octx) expr_print(stmt->meter.set, octx); nft_print(octx, " "); } - nft_print(octx, "{ "); + nft_print(octx, "size %u { ", stmt->meter.size); expr_print(stmt->meter.key, octx); nft_print(octx, " "); -- cgit v1.2.3