mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
netfilter: nf_tables: fix wrong pointer passed to PTR_ERR()
It should be 'chain' passed to PTR_ERR() in the error path
after calling nft_chain_lookup() in nf_tables_delrule().
Fixes: f80a612dd7
("netfilter: nf_tables: add support to destroy operation")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
dac7f50a45
commit
1fb7696ac6
1 changed files with 1 additions and 1 deletions
|
@ -3724,7 +3724,7 @@ static int nf_tables_delrule(struct sk_buff *skb, const struct nfnl_info *info,
|
|||
chain = nft_chain_lookup(net, table, nla[NFTA_RULE_CHAIN],
|
||||
genmask);
|
||||
if (IS_ERR(chain)) {
|
||||
if (PTR_ERR(rule) == -ENOENT &&
|
||||
if (PTR_ERR(chain) == -ENOENT &&
|
||||
NFNL_MSG_TYPE(info->nlh->nlmsg_type) == NFT_MSG_DESTROYRULE)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue