* [nft PATCH] parser: Support table spec in 'list chains' command
@ 2026-03-19 13:32 Phil Sutter
2026-03-20 11:16 ` Florian Westphal
0 siblings, 1 reply; 3+ messages in thread
From: Phil Sutter @ 2026-03-19 13:32 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel, Daniel Winship
Make it possible for users to list all chains in a given table.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
doc/nft.txt | 2 +-
src/parser_bison.y | 2 +-
src/parser_json.c | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/doc/nft.txt b/doc/nft.txt
index b1f7a83aeb78a..cee92c2bc8303 100644
--- a/doc/nft.txt
+++ b/doc/nft.txt
@@ -390,7 +390,7 @@ CHAINS
____
{*add* | *create*} *chain* ['family'] 'table' 'chain' [*{ type* 'type' *hook* 'hook' ['DEVICE'] *priority* 'priority' *;* [*policy* 'policy' *;*] [*comment* 'comment' *;*] *}*]
{*delete* | *destroy* | *list* | *flush*} *chain* ['family'] 'table' 'chain'
-*list chains* ['family']
+*list chains* ['family'] ['table']
*delete chain* ['family'] 'table' *handle* 'handle'
*destroy chain* ['family'] 'table' *handle* 'handle'
*rename chain* ['family'] 'table' 'chain' 'newname'
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 8a470bda942e7..5a334bf0c4997 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1669,7 +1669,7 @@ list_cmd : TABLE table_spec
{
$$ = cmd_alloc(CMD_LIST, CMD_OBJ_CHAIN, &$2, &@$, NULL);
}
- | CHAINS ruleset_spec
+ | CHAINS list_cmd_spec_any
{
$$ = cmd_alloc(CMD_LIST, CMD_OBJ_CHAINS, &$2, &@$, NULL);
}
diff --git a/src/parser_json.c b/src/parser_json.c
index f444b8a0f52f9..2f70b9877c6ed 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -4140,6 +4140,7 @@ static struct cmd *json_parse_cmd_list_multiple(struct json_ctx *ctx,
}
}
switch (obj) {
+ case CMD_OBJ_CHAINS:
case CMD_OBJ_SETS:
case CMD_OBJ_COUNTERS:
case CMD_OBJ_CT_HELPERS:
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [nft PATCH] parser: Support table spec in 'list chains' command
2026-03-19 13:32 [nft PATCH] parser: Support table spec in 'list chains' command Phil Sutter
@ 2026-03-20 11:16 ` Florian Westphal
2026-03-20 11:32 ` Phil Sutter
0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2026-03-20 11:16 UTC (permalink / raw)
To: Phil Sutter; +Cc: Pablo Neira Ayuso, netfilter-devel, Daniel Winship
Phil Sutter <phil@nwl.cc> wrote:
> Make it possible for users to list all chains in a given table.
LGTM, thanks.
Acked-by: Florian Westphal <fw@strlen.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [nft PATCH] parser: Support table spec in 'list chains' command
2026-03-20 11:16 ` Florian Westphal
@ 2026-03-20 11:32 ` Phil Sutter
0 siblings, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2026-03-20 11:32 UTC (permalink / raw)
To: Florian Westphal; +Cc: Pablo Neira Ayuso, netfilter-devel, Daniel Winship
On Fri, Mar 20, 2026 at 12:16:36PM +0100, Florian Westphal wrote:
> Phil Sutter <phil@nwl.cc> wrote:
> > Make it possible for users to list all chains in a given table.
>
> LGTM, thanks.
>
> Acked-by: Florian Westphal <fw@strlen.de>
Also applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-20 11:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 13:32 [nft PATCH] parser: Support table spec in 'list chains' command Phil Sutter
2026-03-20 11:16 ` Florian Westphal
2026-03-20 11:32 ` Phil Sutter
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.