summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-09-26 18:16:57 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-09-27 14:16:27 +0200
commit46af5681f59b06215e781e940c5c0694150b714e (patch)
tree3fe4e191a717f833de318826f149ca3a017ee0c0 /src
parentb0c2606ed02fed828ab7c34227e355f5542bc925 (diff)
parser_bison: allow helper keyword in ct object kind
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>
Diffstat (limited to 'src')
-rw-r--r--src/parser_bison.y11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 0d916190..970d773e 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;
@@ -2886,6 +2886,7 @@ quota_obj : quota_config
;
ct_obj_kind : STRING { $$ = $1; }
+ | HELPER { $$ = xstrdup("helper"); }
;
ct_l4protoname : TCP { $$ = IPPROTO_TCP; }