summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 514dd7eb..05ade0fa 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -398,7 +398,7 @@ static void location_update(struct location *loc, struct location *rhs, int n)
%token FANOUT "fanout"
%token DUP "dup"
-%token ON "on"
+%token FWD "fwd"
%token POSITION "position"
%token COMMENT "comment"
@@ -471,6 +471,8 @@ static void location_update(struct location *loc, struct location *rhs, int n)
%type <val> queue_stmt_flags queue_stmt_flag
%type <stmt> dup_stmt
%destructor { stmt_free($$); } dup_stmt
+%type <stmt> fwd_stmt
+%destructor { stmt_free($$); } fwd_stmt
%type <stmt> set_stmt
%destructor { stmt_free($$); } set_stmt
%type <val> set_stmt_op
@@ -1337,6 +1339,7 @@ stmt : verdict_stmt
| masq_stmt
| redir_stmt
| dup_stmt
+ | fwd_stmt
| set_stmt
;
@@ -1687,6 +1690,13 @@ dup_stmt : DUP TO stmt_expr
}
;
+fwd_stmt : FWD TO expr
+ {
+ $$ = fwd_stmt_alloc(&@$);
+ $$->fwd.to = $3;
+ }
+ ;
+
nf_nat_flags : nf_nat_flag
| nf_nat_flags COMMA nf_nat_flag
{