Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96307a0a authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Pablo Neira Ayuso
Browse files

netfilter: ipt_CLUSTERIP: fix clusterip_net_exit build regression



The added check produces a build error when CONFIG_PROC_FS is
disabled:

net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_net_exit':
net/ipv4/netfilter/ipt_CLUSTERIP.c:822:28: error: 'cn' undeclared (first use in this function)

This moves the variable declaration out of the #ifdef to make it
available to the WARN_ON_ONCE().

Fixes: 613d0776 ("netfilter: exit_net cleanup check added")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 916a2790
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -813,8 +813,8 @@ static int clusterip_net_init(struct net *net)

static void clusterip_net_exit(struct net *net)
{
#ifdef CONFIG_PROC_FS
	struct clusterip_net *cn = net_generic(net, clusterip_net_id);
#ifdef CONFIG_PROC_FS
	proc_remove(cn->procdir);
	cn->procdir = NULL;
#endif