summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-02-20 18:03:18 +0100
committerFlorian Westphal <fw@strlen.de>2017-03-16 10:09:59 +0100
commitaabb9c46ac4cfdff3aad136dd2ed7cb2bb0f9293 (patch)
tree2694f95407d9ac4f0fdb76db092f50042c15e371 /src/parser_bison.y
parentec38e5ed61a088a1fbd2922742c9125aa1c63a7c (diff)
src: allow listing all ct helpers
this implements nft list ct helpers table filter table ip filter { ct helper ftp-standard { .. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 2cf732ce..1bcbff59 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1016,6 +1016,25 @@ list_cmd : TABLE table_spec
{
$$ = cmd_alloc(CMD_LIST, CMD_OBJ_MAP, &$2, &@$, NULL);
}
+ | CT STRING TABLE table_spec
+ {
+ int cmd;
+
+ if (strcmp($2, "helpers") == 0) {
+ cmd = CMD_OBJ_CT_HELPERS;
+ } else {
+ struct error_record *erec;
+
+ erec = error(&@$, "unknown ct class '%s', want 'helpers'", $2);
+
+ if (erec != NULL) {
+ erec_queue(erec, state->msgs);
+ YYERROR;
+ }
+ }
+
+ $$ = cmd_alloc(CMD_LIST, cmd, &$4, &@$, NULL);
+ }
;
reset_cmd : COUNTERS ruleset_spec