From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: fw@strlen.de
Subject: [PATCH nft 3/3] parser_bison: allow helper keyword in ct object kind
Date: Tue, 26 Sep 2017 19:09:51 +0200 [thread overview]
Message-ID: <1506445791-20482-3-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1506445791-20482-1-git-send-email-pablo@netfilter.org>
The helper keyword clashes with the string rule, make sure we still
accept ct helper object types from the parser.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/parser_bison.y | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 351b51010f59..2261b9c7a583 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -877,7 +877,7 @@ add_cmd : TABLE table_spec
{
$$ = cmd_alloc(CMD_ADD, CMD_OBJ_QUOTA, &$2, &@$, $3);
}
- | CT STRING obj_spec ct_obj_alloc '{' ct_block '}' stmt_separator
+ | CT ct_obj_kind obj_spec ct_obj_alloc '{' ct_block '}' stmt_separator
{
struct error_record *erec;
int type;
@@ -961,7 +961,7 @@ create_cmd : TABLE table_spec
{
$$ = cmd_alloc(CMD_CREATE, CMD_OBJ_QUOTA, &$2, &@$, $3);
}
- | CT STRING obj_spec ct_obj_alloc '{' ct_block '}' stmt_separator
+ | CT ct_obj_kind obj_spec ct_obj_alloc '{' ct_block '}' stmt_separator
{
struct error_record *erec;
int type;
@@ -1019,7 +1019,7 @@ delete_cmd : TABLE table_spec
{
$$ = cmd_alloc(CMD_DELETE, CMD_OBJ_QUOTA, &$2, &@$, NULL);
}
- | CT STRING obj_spec ct_obj_alloc
+ | CT ct_obj_kind obj_spec ct_obj_alloc
{
struct error_record *erec;
int type;
@@ -1123,7 +1123,7 @@ list_cmd : TABLE table_spec
{
$$ = cmd_alloc(CMD_LIST, CMD_OBJ_MAP, &$2, &@$, NULL);
}
- | CT STRING obj_spec
+ | CT ct_obj_kind obj_spec
{
struct error_record *erec;
int type;
@@ -1137,7 +1137,7 @@ list_cmd : TABLE table_spec
$$ = cmd_alloc_obj_ct(CMD_LIST, type, &$3, &@$, NULL);
}
- | CT STRING TABLE table_spec
+ | CT ct_obj_kind TABLE table_spec
{
int cmd;
@@ -2882,6 +2882,7 @@ quota_obj : quota_config
;
ct_obj_kind : STRING { $$ = $1; }
+ | HELPER { $$ = xstrdup("helper"); }
;
ct_l4protoname : TCP { $$ = IPPROTO_TCP; }
--
2.1.4
prev parent reply other threads:[~2017-09-26 17:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 17:09 [PATCH nft 1/3] parser_bison: consolidate stmt_expr rule Pablo Neira Ayuso
2017-09-26 17:09 ` [PATCH nft 2/3] parser_bison: use keywords in ct expression Pablo Neira Ayuso
2017-09-26 17:09 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1506445791-20482-3-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).