netfilter: nf_tables: fix flush after rule deletion in the same batch
commitc92ba8820aca58e38dceeec554904307ac2e0851
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 15 Feb 2019 11:50:24 +0000 (15 12:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2019 09:08:08 +0000 (27 10:08 +0100)
treec4936bbb51ab0614b8f99bb0fb16354f5e89ece0
parent9ac5e6507acbe06a25de03ea9f3089c2f662a72f
netfilter: nf_tables: fix flush after rule deletion in the same batch

commit 23b7ca4f745f21c2b9cfcb67fdd33733b3ae7e66 upstream.

Flush after rule deletion bogusly hits -ENOENT. Skip rules that have
been already from nft_delrule_by_chain() which is always called from the
flush path.

Fixes: cf9dc09d0949 ("netfilter: nf_tables: fix missing rules flushing per table")
Reported-by: Phil Sutter <phil@nwl.cc>
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nf_tables_api.c