diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-09-23 19:00:33 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-10-12 20:34:21 +0200 |
commit | 716048ab2128b9af3e348fec3eefefea6f873be2 (patch) | |
tree | f53862e60a607e43d08e514f5ed481f577179573 /src/evaluate.c | |
parent | c62df142dcbc3f4123bf3c677abfbe53ce5d9167 (diff) |
src: add `list chains' command
# nft list chains
table ip filter {
chain test1 {
}
chain test2 {
}
chain input {
type filter hook input priority 0; policy accept;
}
}
table ip6 filter {
chain test1 {
}
chain input {
type filter hook input priority 0; policy accept;
}
}
You can also filter out per family:
# nft list chains ip
table ip x {
chain y {
}
chain xz {
}
chain input {
type filter hook input priority 0; policy accept;
}
}
# nft list chains ip6
table ip6 filter {
chain x {
}
chain input {
type filter hook input priority 0; policy accept;
}
}
This command only shows the chain declarations, so the content (the
definition) is omitted.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index e8eafc64..97625864 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -2105,6 +2105,7 @@ static int cmd_evaluate_list(struct eval_ctx *ctx, struct cmd *cmd) return cmd_error(ctx, "Could not process rule: Chain '%s' does not exist", cmd->handle.chain); return 0; + case CMD_OBJ_CHAINS: case CMD_OBJ_SETS: case CMD_OBJ_RULESET: return 0; |