path: root/src/statement.c
diff options
authorPablo Neira Ayuso <>2016-05-13 19:28:44 +0200
committerPablo Neira Ayuso <>2016-05-13 20:06:42 +0200
commit42205fc9d1fc96f5398c44ec07c760f8b7660ac0 (patch)
treea19e7be92d7468d323baa522fb6ddcae5f3ddd93 /src/statement.c
parent3ed5e31f4a323d7f054b6120d05134195dc681f0 (diff)
parser_bison: update flow table syntax
Before we release next nft version, update the syntax to wrap the flow table definition between brackets, eg. # nft add rule filter input tcp dport 22 ct state new \ flow table ssh { ip saddr limit rate 10/second } # nft add rule filter input \ flow table acct { iif . ip saddr timeout 60s counter } When playing around with this in your initial patchset I found very confusing that it may not look obvious to users that they can only use one single statement. For example: # nft add rule filter input \ flow table acct iif . ip saddr timeout 60s counter limit rate 10/second ~~~~~~~~~~~~~~~~~~~~ Note that this limit rate applies globally, so this patch resolves this ambiguity. This may cause us problems in the future too if we extend this to support more than one single statement per flowtable entry (Not telling we need this now, but if someone comes up with a useful usecase, we should be capable of extending this). Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/statement.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/statement.c b/src/statement.c
index 988cfeb7..76f528b3 100644
--- a/src/statement.c
+++ b/src/statement.c
@@ -112,9 +112,11 @@ static void flow_stmt_print(const struct stmt *stmt)
printf(" ");
+ printf("{ ");
printf(" ");
+ printf("} ");
static void flow_stmt_destroy(struct stmt *stmt)