]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
src: meter: avoid double-space in list ruleset output
authorFlorian Westphal <fw@strlen.de>
Thu, 19 Sep 2019 09:23:46 +0000 (11:23 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 20 Sep 2019 10:02:42 +0000 (12:02 +0200)
changes
meter f size 1024 { ip saddr limit rate 10/second}  accept
to
meter f size 1024 { ip saddr limit rate 10/second } accept

Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/statement.c
tests/shell/testcases/sets/dumps/0022type_selective_flush_0.nft

index 5aa5b1e0bda4fbabbdc0ea0f561aed6b93fe6772..af84e06c971e81161fd1c66af815e7a9b2102d83 100644 (file)
@@ -128,7 +128,7 @@ static void meter_stmt_print(const struct stmt *stmt, struct output_ctx *octx)
        stmt_print(stmt->meter.stmt, octx);
        octx->flags = flags;
 
-       nft_print(octx, "");
+       nft_print(octx, " }");
 
 }
 
index e518906cc35bea39942c0587492cf70d69fcd4d6..5a6e3261b4ba7b2c062de1f48f1d285355043fca 100644 (file)
@@ -8,6 +8,6 @@ table ip t {
        }
 
        chain c {
-               tcp dport 80 meter f size 1024 { ip saddr limit rate 10/second
+               tcp dport 80 meter f size 1024 { ip saddr limit rate 10/second }
        }
 }