aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nfnetlink.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/nfnetlink.c
parentnetfilter: nf_tables: add and use helper for module autoload (diff)
downloadlinux-dev-ca2f18be792fddd0db2bbf6cbe1ec12d1bb32dd7.tar.xz
linux-dev-ca2f18be792fddd0db2bbf6cbe1ec12d1bb32dd7.zip
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/nfnetlink.c')
-rw-r--r--net/netfilter/nfnetlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index e1b6be29848d..94f9bcaa0799 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -331,13 +331,13 @@ replay:
}
}
- if (!ss->commit || !ss->abort) {
+ if (!ss->valid_genid || !ss->commit || !ss->abort) {
nfnl_unlock(subsys_id);
netlink_ack(oskb, nlh, -EOPNOTSUPP, NULL);
return kfree_skb(skb);
}
- if (genid && ss->valid_genid && !ss->valid_genid(net, genid)) {
+ if (!ss->valid_genid(net, genid)) {
nfnl_unlock(subsys_id);
netlink_ack(oskb, nlh, -ERESTART, NULL);
return kfree_skb(skb);