From 850f0a56b6ad625d6c5d8ba28ec4f55ec02ff2a7 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 28 Jul 2016 20:03:53 +0200 Subject: src: add 'to' for snat and dnat This is extra syntaxtic sugar to get this consistent with other statements such as redirect, masquerade, dup and fwd that indicates where to go. Existing syntax is still preserved, but the listing shows the one including 'to'. Signed-off-by: Pablo Neira Ayuso --- src/parser_bison.y | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/parser_bison.y') diff --git a/src/parser_bison.y b/src/parser_bison.y index e16b8a32..ba2dba41 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -1649,18 +1649,18 @@ stmt_expr : map_stmt_expr | primary_rhs_expr ; -nat_stmt_args : stmt_expr +nat_stmt_args : TO stmt_expr { - $0->nat.addr = $1; + $0->nat.addr = $2; } - | stmt_expr COLON stmt_expr + | TO stmt_expr COLON stmt_expr { - $0->nat.addr = $1; - $0->nat.proto = $3; + $0->nat.addr = $2; + $0->nat.proto = $4; } - | COLON stmt_expr + | TO COLON stmt_expr { - $0->nat.proto = $2; + $0->nat.proto = $3; } | nat_stmt_args nf_nat_flags { -- cgit v1.2.3