提交 39f618b4 编写于 作者: J Julian Anastasov 提交者: Simon Horman

ipvs: reset ipvs pointer in netns

	Make sure net->ipvs is reset on netns cleanup or failed
initialization. It is needed for IPVS applications to know that
IPVS core is not loaded in netns.
Signed-off-by: NJulian Anastasov <ja@ssi.bg>
Acked-by: NHans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: NSimon Horman <horms@verge.net.au>
上级 8d08d71c
......@@ -1924,6 +1924,7 @@ static int __net_init __ip_vs_init(struct net *net)
control_fail:
ip_vs_estimator_net_cleanup(net);
estimator_fail:
net->ipvs = NULL;
return -ENOMEM;
}
......@@ -1936,6 +1937,7 @@ static void __net_exit __ip_vs_cleanup(struct net *net)
ip_vs_control_net_cleanup(net);
ip_vs_estimator_net_cleanup(net);
IP_VS_DBG(2, "ipvs netns %d released\n", net_ipvs(net)->gen);
net->ipvs = NULL;
}
static void __net_exit __ip_vs_dev_cleanup(struct net *net)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册