summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2016-02-16 07:50:22 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2016-02-16 07:50:22 +0100
commitb418935ba84bce0fd2dd332b87df8d56c707e056 (patch)
treef2f1d3e74e50ae72e18652f7c6d7c409c32e1b24 /kernel/include/linux
parent9592763b89d03e988fb46f2fc05c0cdc992534d3 (diff)
netfilter: nfnetlink: pass down netns pointer to call() and call_rcu()
Backport patch from Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'kernel/include/linux')
-rw-r--r--kernel/include/linux/netfilter/ipset/ip_set_compat.h.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
index 33f14eb..f08f538 100644
--- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
+++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
@@ -30,6 +30,7 @@
#@HAVE_ETHER_ADDR_COPY@ HAVE_ETHER_ADDR_COPY
#@HAVE_NF_BRIDGE_GET_PHYSDEV@ HAVE_NF_BRIDGE_GET_PHYSDEV
#@HAVE_NLA_PUT_IN_ADDR@ HAVE_NLA_PUT_IN_ADDR
+#@HAVE_NET_IN_NFNL_CALLBACK_FN@ HAVE_NET_IN_NFNL_CALLBACK_FN
#ifdef HAVE_EXPORT_H
#include <linux/export.h>
@@ -252,6 +253,14 @@ static inline int nla_put_in6_addr(struct sk_buff *skb, int attrtype,
}
#endif
+#ifdef HAVE_NET_IN_NFNL_CALLBACK_FN
+#define IPSET_CBFN(fn, net, nl, skb, nlh, cda) fn(net, nl, skb, nlh, cda)
+#define IPSET_SOCK_NET(net, ctnl) net
+#else
+#define IPSET_CBFN(fn, net, nl, skb, nlh, cda) fn(nl, skb, nlh, cda)
+#define IPSET_SOCK_NET(net, ctnl) sock_net(ctnl)
+#endif
+
#ifndef smp_mb__before_atomic
#define smp_mb__before_atomic() smp_mb()
#define smp_mb__after_atomic() smp_mb()