From 239a8fbbaa061d55c653922e158d8ba352eaf57f Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 30 May 2018 12:40:32 +0200 Subject: statement: old kernels are allowing burst zero, don't print it Don't print limit burst zero which was the default value in old kernels, this is not allowed in more recent kernels that now operate like iptables xt_limit which is what users are expecting. Signed-off-by: Pablo Neira Ayuso --- src/statement.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/statement.c b/src/statement.c index fa0cd77c..ac151737 100644 --- a/src/statement.c +++ b/src/statement.c @@ -358,7 +358,7 @@ static void limit_stmt_print(const struct stmt *stmt, struct output_ctx *octx) nft_print(octx, "limit rate %s%" PRIu64 "/%s", inv ? "over " : "", stmt->limit.rate, get_unit(stmt->limit.unit)); - if (stmt->limit.burst != 5) + if (stmt->limit.burst && stmt->limit.burst != 5) nft_print(octx, " burst %u packets", stmt->limit.burst); break; -- cgit v1.2.3