From: Pablo Neira Ayuso Date: Wed, 23 May 2018 09:55:24 +0000 (+0200) Subject: xtables: inconsistent error reporting for -X and no empty chain X-Git-Tag: v1.8.0~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94fd83d957224eff6043ec6731851dd1a5ae2d4d;p=thirdparty%2Fiptables.git xtables: inconsistent error reporting for -X and no empty chain # iptables-compat -N coffee # iptables-compat -I coffee # iptables-compat -X coffee iptables: Device or resource busy. While it should say: iptables: Directory not empty. Signed-off-by: Pablo Neira Ayuso --- diff --git a/iptables/nft.c b/iptables/nft.c index 5f7e3ab2..240e77bb 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -1442,6 +1442,8 @@ int nft_chain_user_del(struct nft_handle *h, const char *chain, const char *tabl int ret = 0; int deleted_ctr = 0; + nft_fn = nft_chain_user_del; + list = nftnl_chain_list_get(h); if (list == NULL) goto err;