[Devel] [PATCH rh7 6/7] netfilter: ipt_CLUSTERIP: create proc entry under proper ipt_CLUSTERIP directory

Vladimir Davydov vdavydov at parallels.com
Fri Jun 26 03:00:28 PDT 2015


From: Gao feng <gaofeng at cn.fujitsu.com>

Create proc entries under the ipt_CLUSTERIP directory of proper
net namespace.

Signed-off-by: Gao feng <gaofeng at cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
(cherry picked from commit f58d7866018dedae7ec67e152402b8ede17ce39e)
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 8945df539da5..78b7767afb30 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -168,7 +168,7 @@ clusterip_config_init(const struct ipt_clusterip_tgt_info *i, __be32 ip,
 			struct net_device *dev)
 {
 	struct clusterip_config *c;
-	struct clusterip_net *cn = net_generic(&init_net, clusterip_net_id);
+	struct clusterip_net *cn = net_generic(dev_net(dev), clusterip_net_id);
 
 	c = kzalloc(sizeof(*c), GFP_ATOMIC);
 	if (!c)
-- 
2.1.4




More information about the Devel mailing list