From 9f7817a4e0223c5e285a3f4a4dccbf1dafa7fc4e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 19 Nov 2018 12:22:06 +0100 Subject: src: introduce simple hints on incorrect chain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # nft list chain x y Error: No such file or directory; did you mean chain ‘y’ in table inet ‘x’? list chain x 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 a3e0bf11..66786bdb 100644 --- a/include/rule.h +++ b/include/rule.h @@ -221,6 +221,9 @@ extern void chain_free(struct chain *chain); extern void chain_add_hash(struct chain *chain, struct table *table); extern struct chain *chain_lookup(const struct table *table, const struct handle *h); +extern struct chain *chain_lookup_fuzzy(const struct handle *h, + const struct nft_cache *cache, + const struct table **table); extern const char *family2str(unsigned int family); extern const char *hooknum2str(unsigned int family, unsigned int hooknum); -- cgit v1.2.3