From: Pablo Neira Ayuso Date: Wed, 2 Jun 2021 23:25:32 +0000 (+0200) Subject: statement: connlimit: remove extra whitespace in print function X-Git-Tag: v1.0.0~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea5e892af8e2aed9871b5cc7589afc20dd02015b;p=thirdparty%2Fnftables.git statement: connlimit: remove extra whitespace in print function Instead of: ct count 2 accept ^^ simply print: ct count 2 accept While at it, add incomplete reference 'ct count' to manpage. Signed-off-by: Pablo Neira Ayuso --- diff --git a/doc/payload-expression.txt b/doc/payload-expression.txt index a338dcf0..bc31e81c 100644 --- a/doc/payload-expression.txt +++ b/doc/payload-expression.txt @@ -699,7 +699,7 @@ is true for the *zone*, if a direction is given, the zone is only matched if the zone id is tied to the given direction. + [verse] -*ct* {*state* | *direction* | *status* | *mark* | *expiration* | *helper* | *label*} +*ct* {*state* | *direction* | *status* | *mark* | *expiration* | *helper* | *label* | *count*} *ct* [*original* | *reply*] {*l3proto* | *protocol* | *bytes* | *packets* | *avgpkt* | *zone* | *id*} *ct* {*original* | *reply*} {*proto-src* | *proto-dst*} *ct* {*original* | *reply*} {*ip* | *ip6*} {*saddr* | *daddr*} diff --git a/src/statement.c b/src/statement.c index f7f1c0c4..7537c07f 100644 --- a/src/statement.c +++ b/src/statement.c @@ -201,7 +201,7 @@ struct stmt *meter_stmt_alloc(const struct location *loc) static void connlimit_stmt_print(const struct stmt *stmt, struct output_ctx *octx) { - nft_print(octx, "ct count %s%u ", + nft_print(octx, "ct count %s%u", stmt->connlimit.flags ? "over " : "", stmt->connlimit.count); }