From d7476ddd5f7de35cbc1b5b13d52733f788172ada Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 19 Nov 2018 11:41:07 +0100 Subject: src: introduce simple hints on incorrect table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds simple infrastructure to provide a hints to user on references to incorrect table. While at it, remove "Could not process rule:" which I think it is implicit in the error. # nft rule x y ip saddr @y Error: No such file or directory; did you mean table ‘x’ in family inet? Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/rule.h b/include/rule.h index 197efab4..a3e0bf11 100644 --- a/include/rule.h +++ b/include/rule.h @@ -153,6 +153,8 @@ extern void table_free(struct table *table); extern void table_add_hash(struct table *table, struct nft_cache *cache); extern struct table *table_lookup(const struct handle *h, const struct nft_cache *cache); +extern struct table *table_lookup_fuzzy(const struct handle *h, + const struct nft_cache *cache); /** * enum chain_flags - chain flags -- cgit v1.2.3