summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-08-16 23:36:54 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-18 03:14:58 +0200
commit0d21d1ec727cd8cad9cc26b74a6db1ced6739189 (patch)
treefcb3d458ccb5571ddda5780f634b2ab0d53209bf /src/parser_bison.y
parent6f2eb8548e0d18078989adec069b438b2f154767 (diff)
parser_bison: redirect to :port for consistency with nat/masq statement
Use the colon port syntax for consistency with other statements. Existing syntax is still preserved but the output displays the colon. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index f4ce11d5..8025415c 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1701,6 +1701,10 @@ redir_stmt_arg : TO stmt_expr
{
$<stmt>0->redir.proto = $2;
}
+ | TO COLON stmt_expr
+ {
+ $<stmt>0->redir.proto = $3;
+ }
| nf_nat_flags
{
$<stmt>0->redir.flags = $1;
@@ -1710,6 +1714,11 @@ redir_stmt_arg : TO stmt_expr
$<stmt>0->redir.proto = $2;
$<stmt>0->redir.flags = $3;
}
+ | TO COLON stmt_expr nf_nat_flags
+ {
+ $<stmt>0->redir.proto = $3;
+ $<stmt>0->redir.flags = $4;
+ }
;
dup_stmt : DUP TO stmt_expr