summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-01-07 13:23:33 +0100
committerFlorian Westphal <fw@strlen.de>2016-01-07 13:23:33 +0100
commit757b3ab08b8b22f230fb8e481bec78ecbfbb335a (patch)
tree6da3963f04e13807ed3f660639a177306b014155 /src/parser_bison.y
parentc2494dd6daac9a91f090504de6d38b7f404f0c1f (diff)
nft: swap key and direction in ct_dir syntax
old: ct saddr original 1.2.3.4 new: ct original saddr 1.2.3.4 The advantage is that this allows to add ct keys where direction is optional without creating ambiguities in the parser. So we can have ct packets gt 42 ct original packets gt 42 Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index fcf84b9a..ca9b757a 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -2252,18 +2252,18 @@ ct_expr : CT ct_key
{
$$ = ct_expr_alloc(&@$, $2, -1);
}
- | CT ct_key_dir STRING
+ | CT STRING ct_key_dir
{
struct error_record *erec;
int8_t direction;
- erec = ct_dir_parse(&@$, $3, &direction);
+ erec = ct_dir_parse(&@$, $2, &direction);
if (erec != NULL) {
erec_queue(erec, state->msgs);
YYERROR;
}
- $$ = ct_expr_alloc(&@$, $2, direction);
+ $$ = ct_expr_alloc(&@$, $3, direction);
}
;