From 9b169bfc650ebeb81aff80ba2bf87d729dc3143e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 13 Jul 2021 20:18:15 +0200 Subject: src: remove STMT_NAT_F_INTERVAL flags and interval keyword STMT_NAT_F_INTERVAL is not useful, the keyword interval can be removed to simplify the syntax, e.g. snat to ip saddr map { 10.141.11.4 : 192.168.2.2-192.168.2.4 } This patch reworks 9599d9d25a6b ("src: NAT support for intervals in maps"). Do not remove STMT_NAT_F_INTERVAL yet since this flag is needed for interval concatenations coming in a follow up patch. Signed-off-by: Pablo Neira Ayuso --- src/parser_bison.y | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/parser_bison.y') diff --git a/src/parser_bison.y b/src/parser_bison.y index 872d7cdb..790cd832 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -3623,28 +3623,24 @@ nat_stmt_args : stmt_expr { $0->nat.family = $1; $0->nat.addr = $4; - $0->nat.type_flags = STMT_NAT_F_INTERVAL; } | INTERVAL TO stmt_expr { $0->nat.addr = $3; - $0->nat.type_flags = STMT_NAT_F_INTERVAL; } | nf_key_proto PREFIX TO stmt_expr { $0->nat.family = $1; $0->nat.addr = $4; $0->nat.type_flags = - STMT_NAT_F_PREFIX | - STMT_NAT_F_INTERVAL; + STMT_NAT_F_PREFIX; $0->nat.flags |= NF_NAT_RANGE_NETMAP; } | PREFIX TO stmt_expr { $0->nat.addr = $3; $0->nat.type_flags = - STMT_NAT_F_PREFIX | - STMT_NAT_F_INTERVAL; + STMT_NAT_F_PREFIX; $0->nat.flags |= NF_NAT_RANGE_NETMAP; } ; -- cgit v1.2.3