From 285bb67a11ad2a6cac29b9f0eff3cf6066e0d39f Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 19 Nov 2018 13:02:03 +0100 Subject: src: introduce simple hints on incorrect set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # nft rule x y ip saddr @y Error: No such file or directory; did you mean set ‘y’ in table inet ‘x’? rule x y ip saddr @y ^^ Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/rule.h b/include/rule.h index 66786bdb..85b9f80d 100644 --- a/include/rule.h +++ b/include/rule.h @@ -308,6 +308,9 @@ extern void set_add_hash(struct set *set, struct table *table); extern struct set *set_lookup(const struct table *table, const char *name); extern struct set *set_lookup_global(uint32_t family, const char *table, const char *name, struct nft_cache *cache); +extern struct set *set_lookup_fuzzy(const char *set_name, + const struct nft_cache *cache, + const struct table **table); extern const char *set_policy2str(uint32_t policy); extern void set_print(const struct set *set, struct output_ctx *octx); extern void set_print_plain(const struct set *s, struct output_ctx *octx); -- cgit v1.2.3