netfilter: fix clusterip_net_exit build regression
Subsystems (3)
PATCH 1/1 netfilter: 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().
--- net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/netfilter/ipt_CLUSTERIP.c +1 -1
@@ -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
Signature · 1 line
2.9.0
thank you,
it was mu fault.
Quoted 30 lines · Arnd Bergmann
The added check produces a build error when
CONFIG_PROC_FSis 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 613d0776d3fe ("netfilter: exit_net cleanup check added")Signed-off-by Arnd Bergmann <[email protected]>--- net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/ipv4/netfilter/ipt_CLUSTERIP.c +1
-1@@ -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
Quoted 8 lines · Arnd Bergmann
The added check produces a build error when
CONFIG_PROC_FSis 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().
Applied, thanks Arnd.