[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160930160559.4102745-2-arnd@arndb.de>
Date: Fri, 30 Sep 2016 18:05:35 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Pablo Neira Ayuso <pablo@...filter.org>
Cc: Arnd Bergmann <arnd@...db.de>, Patrick McHardy <kaber@...sh.net>,
Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
"David S. Miller" <davem@...emloft.net>,
Aaron Conole <aconole@...heb.org>,
Florian Westphal <fw@...len.de>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] netfilter: hide reference to nf_hooks_ingress
A recent cleanup added an unconditional reference to the nf_hooks_ingress pointer,
but that fails when CONFIG_NETFILTER_INGRESS is disabled and that member is
not present in net_device:
net/netfilter/core.c: In function 'nf_set_hooks_head':
net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'
This avoids the build error by simply enclosing the assignment in an #ifdef,
which may or may not be the correct fix.
Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
net/netfilter/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 576a9c0406a9..5ccff1d9f209 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -90,10 +90,12 @@ static void nf_set_hooks_head(struct net *net, const struct nf_hook_ops *reg,
{
switch (reg->pf) {
case NFPROTO_NETDEV:
+#ifdef CONFIG_NETFILTER_INGRESS
/* We already checked in nf_register_net_hook() that this is
* used from ingress.
*/
rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
+#endif
break;
default:
rcu_assign_pointer(net->nf.hooks[reg->pf][reg->hooknum],
--
2.9.0
Powered by blists - more mailing lists