netfilter: ipt_CLUSTERIP: fix build error without procfs
Subsystems (3)
PATCH 1/1 netfilter: ipt_CLUSTERIP: fix build error without procfs
We can't access c->pde if CONFIG_PROC_FS is disabled:
net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_config_find_get':net/ipv4/netfilter/ipt_CLUSTERIP.c:147:9: error: 'struct clusterip_config' has no member named 'pde'
This moves the check inside of another #ifdef.
Fixes 6c5d5cfbe3c5 ("netfilter: ipt_CLUSTERIP: check duplicate config when initializing")
Signed-off-by Arnd Bergmann <[email protected]>
--- net/ipv4/netfilter/ipt_CLUSTERIP.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/ipv4/netfilter/ipt_CLUSTERIP.c +6 -1
@@ -144,7 +144,12 @@ clusterip_config_find_get(struct net *net, __be32 clusterip, int entry)rcu_read_lock_bh (); c =__clusterip_config_find (net, clusterip);if (c) { -if (!c->pde ||unlikely (!atomic_inc_not_zero (&c->refcount))) +#ifdef CONFIG_PROC_FS +if (!c->pde) + c =NULL ; + else +#endif +if (unlikely (!atomic_inc_not_zero (&c->refcount))) c =NULL ;else if (entry)atomic_inc (&c->entries);
Signature · 1 line
2.9.0
Quoted 9 lines · Arnd Bergmann
We can't access
c->pdeifCONFIG_PROC_FSis disabled:
net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_config_find_get':net/ipv4/netfilter/ipt_CLUSTERIP.c:147:9: error: 'structclusterip_config' has no member named 'pde'This moves the check inside of another #ifdef.
Fixes 6c5d5cfbe3c5 ("netfilter: ipt_CLUSTERIP: check duplicate config when initializing")Signed-off-by Arnd Bergmann <[email protected]>
Applied, thanks Arnd.