From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: mayhs11saini@gmail.com, anthonyryan1@gmail.com, phil@nwl.cc
Subject: [PATCH nft] parser_bison: restore nft {import,export} ruleset
Date: Wed, 14 Feb 2018 19:32:44 +0100 [thread overview]
Message-ID: <20180214183244.16184-1-pablo@netfilter.org> (raw)
Restore original syntax for the yet experimental VM low-level json
representation.
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1224
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
I asked for this change to make room for the high-level json
representation, but we can use -j options for this instead. Given there
are more users for the json representation that I expected, I'm fixing
it myself by restoring the former behaviour.
src/parser_bison.y | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 578bfdc10429..4cfc54cfd7b2 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1186,7 +1186,7 @@ rename_cmd : CHAIN chain_spec identifier
}
;
-import_cmd : RULESET markup_format
+import_cmd : RULESET markup_format
{
struct handle h = { .family = NFPROTO_UNSPEC };
struct markup *markup = markup_alloc($2);
@@ -1198,7 +1198,6 @@ import_cmd : RULESET markup_format
struct markup *markup = markup_alloc($1);
$$ = cmd_alloc(CMD_IMPORT, CMD_OBJ_MARKUP, &h, &@$, markup);
}
- | JSON { $$ = NULL; }
;
export_cmd : RULESET markup_format
@@ -1213,7 +1212,6 @@ export_cmd : RULESET markup_format
struct markup *markup = markup_alloc($1);
$$ = cmd_alloc(CMD_EXPORT, CMD_OBJ_MARKUP, &h, &@$, markup);
}
- | JSON { $$ = NULL; }
;
monitor_cmd : monitor_event monitor_object monitor_format
@@ -1241,10 +1239,10 @@ monitor_object : /* empty */ { $$ = CMD_MONITOR_OBJ_ANY; }
monitor_format : /* empty */ { $$ = NFTNL_OUTPUT_DEFAULT; }
| markup_format
- | JSON { $$ = NFTNL_OUTPUT_JSON; }
;
markup_format : XML { $$ = NFTNL_OUTPUT_XML; }
+ | JSON { $$ = NFTNL_OUTPUT_JSON; }
| VM JSON { $$ = NFTNL_OUTPUT_JSON; }
;
--
2.11.0
next reply other threads:[~2018-02-14 18:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 18:32 Pablo Neira Ayuso [this message]
2018-02-14 19:04 ` [PATCH nft] parser_bison: restore nft {import,export} ruleset Shyam Saini
2018-02-14 19:16 ` Pablo Neira Ayuso
2018-02-14 19:27 ` Pablo Neira Ayuso
2018-02-14 19:55 ` Shyam Saini
2018-02-15 10:51 ` Phil Sutter
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=20180214183244.16184-1-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=anthonyryan1@gmail.com \
--cc=mayhs11saini@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.