* [PATCH nft] evaluate: allow get/list/flush dynamic sets and maps via list command
@ 2019-06-18 13:12 Pablo Neira Ayuso
0 siblings, 0 replies; only message in thread
From: Pablo Neira Ayuso @ 2019-06-18 13:12 UTC (permalink / raw)
To: netfilter-devel; +Cc: vaclav.zindulka
Before:
# nft list set ip filter untracked_unknown
Error: No such file or directory; did you mean set ‘untracked_unknown’ in table ip ‘filter’?
list set ip filter untracked_unknown
^^^^^^^^^^^^^^^^^
After:
# nft list set ip filter untracked_unknown
table ip filter {
set untracked_unknown {
type ipv4_addr . inet_service . ipv4_addr . inet_service . inet_proto
size 100000
flags dynamic,timeout
}
}
Reported-by: Václav Zindulka <vaclav.zindulka@tlapnet.cz>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/evaluate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/evaluate.c b/src/evaluate.c
index 511f9f14bedd..07617a7c94cb 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -3520,7 +3520,7 @@ static int cmd_evaluate_get(struct eval_ctx *ctx, struct cmd *cmd)
return table_not_found(ctx);
set = set_lookup(table, cmd->handle.set.name);
- if (set == NULL || set->flags & (NFT_SET_MAP | NFT_SET_EVAL))
+ if (set == NULL || set->flags & NFT_SET_MAP)
return set_not_found(ctx, &ctx->cmd->handle.set.location,
ctx->cmd->handle.set.name);
@@ -3587,7 +3587,7 @@ static int cmd_evaluate_list(struct eval_ctx *ctx, struct cmd *cmd)
return table_not_found(ctx);
set = set_lookup(table, cmd->handle.set.name);
- if (set == NULL || set->flags & (NFT_SET_MAP | NFT_SET_EVAL))
+ if (set == NULL || set->flags & NFT_SET_MAP)
return set_not_found(ctx, &ctx->cmd->handle.set.location,
ctx->cmd->handle.set.name);
@@ -3698,7 +3698,7 @@ static int cmd_evaluate_flush(struct eval_ctx *ctx, struct cmd *cmd)
return table_not_found(ctx);
set = set_lookup(table, cmd->handle.set.name);
- if (set == NULL || set->flags & (NFT_SET_MAP | NFT_SET_EVAL))
+ if (set == NULL || set->flags & NFT_SET_MAP)
return set_not_found(ctx, &ctx->cmd->handle.set.location,
ctx->cmd->handle.set.name);
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-18 13:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18 13:12 [PATCH nft] evaluate: allow get/list/flush dynamic sets and maps via list command Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).