Blame SOURCES/0045-parser_bison-no-need-for-statement-separator-for-ct-.patch

bacbc8
From 156f738087525eeb35e1225d8fb1e23da71dc58b Mon Sep 17 00:00:00 2001
bacbc8
From: Pablo Neira Ayuso <pablo@netfilter.org>
bacbc8
Date: Thu, 14 Mar 2019 11:04:37 +0100
bacbc8
Subject: [PATCH] parser_bison: no need for statement separator for ct object
bacbc8
 commands
bacbc8
bacbc8
Otherwise, this forces user to place a double semi-colon to skip a
bacbc8
parser error in a multi-line commands:
bacbc8
bacbc8
 # nft add "ct helper ip filter test { type \"ftp\" protocol tcp; };add rule filter test ct helper set \"ftp\""
bacbc8
 Error: syntax error, unexpected add, expecting end of file or newline or semicolon
bacbc8
 add ct helper ip filter test { type "ftp" protocol tcp; };add rule filter test ct helper set "ftp"
bacbc8
                                                           ^^^
bacbc8
bacbc8
Reported-by: Laura Garcia <nevola@gmail.com>
bacbc8
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
bacbc8
(cherry picked from commit d3cace26609253a8e3f20aeb8693f37d63897a7e)
bacbc8
bacbc8
Conflicts:
bacbc8
	src/parser_bison.y
bacbc8
-> Some chunks dropped for missing commit c7c94802679cd
bacbc8
   ("src: add ct timeout support")
bacbc8
bacbc8
Signed-off-by: Phil Sutter <psutter@redhat.com>
bacbc8
---
bacbc8
 src/parser_bison.y | 4 ++--
bacbc8
 1 file changed, 2 insertions(+), 2 deletions(-)
bacbc8
bacbc8
diff --git a/src/parser_bison.y b/src/parser_bison.y
bacbc8
index f86a754deea8e..99d60822790dc 100644
bacbc8
--- a/src/parser_bison.y
bacbc8
+++ b/src/parser_bison.y
bacbc8
@@ -941,7 +941,7 @@ add_cmd			:	TABLE		table_spec
bacbc8
 			{
bacbc8
 				$$ = cmd_alloc(CMD_ADD, CMD_OBJ_QUOTA, &$2, &@$, $3);
bacbc8
 			}
bacbc8
-			|	CT	HELPER	obj_spec	ct_obj_alloc	'{' ct_helper_block '}'	stmt_separator
bacbc8
+			|	CT	HELPER	obj_spec	ct_obj_alloc	'{' ct_helper_block '}'
bacbc8
 			{
bacbc8
 
bacbc8
 				$$ = cmd_alloc_obj_ct(CMD_ADD, NFT_OBJECT_CT_HELPER, &$3, &@$, $4);
bacbc8
@@ -1023,7 +1023,7 @@ create_cmd		:	TABLE		table_spec
bacbc8
 			{
bacbc8
 				$$ = cmd_alloc(CMD_CREATE, CMD_OBJ_QUOTA, &$2, &@$, $3);
bacbc8
 			}
bacbc8
-			|	CT	HELPER	obj_spec	ct_obj_alloc	'{' ct_helper_block '}'	stmt_separator
bacbc8
+			|	CT	HELPER	obj_spec	ct_obj_alloc	'{' ct_helper_block '}'
bacbc8
 			{
bacbc8
 				$$ = cmd_alloc_obj_ct(CMD_CREATE, NFT_OBJECT_CT_HELPER, &$3, &@$, $4);
bacbc8
 			}
bacbc8
-- 
bacbc8
2.21.0
bacbc8