summaryrefslogtreecommitdiff
path: root/net/netfilter/nf_tables_api.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-07-11 13:45:11 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-07-18 11:26:45 +0200
commitca2f18be792fddd0db2bbf6cbe1ec12d1bb32dd7 (patch)
tree706fd92db3b395541a5c2d8d6b4c8aa7db846723 /net/netfilter/nf_tables_api.c
parent452238e8d5ffd8b77f92387519513839d4ca7379 (diff)
netfilter: nf_tables: make valid_genid callback mandatory
always call this function, followup patch can use this to aquire a per-netns transaction log to guard the entire batch instead of using the nfnl susbsys mutex (which is shared among all namespaces). Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_api.c')
-rw-r--r--net/netfilter/nf_tables_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 5e95e92e547b..594b395442d6 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -6591,7 +6591,7 @@ static int nf_tables_abort(struct net *net, struct sk_buff *skb)
static bool nf_tables_valid_genid(struct net *net, u32 genid)
{
- return net->nft.base_seq == genid;
+ return genid == 0 || net->nft.base_seq == genid;
}
static const struct nfnetlink_subsystem nf_tables_subsys = {