summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2012-04-25 00:29:58 +0300
committerSimon Horman <horms@verge.net.au>2012-04-26 15:26:35 +0900
commit39f618b4fd95ae243d940ec64c961009c74e3333 (patch)
treef96ef28f9d3ff364da1710f32ff44c31873fb714 /net
parent8d08d71ce59438a6ef06be5db07966e0c144b74e (diff)
downloadlinux-3.10-39f618b4fd95ae243d940ec64c961009c74e3333.tar.gz
linux-3.10-39f618b4fd95ae243d940ec64c961009c74e3333.tar.bz2
linux-3.10-39f618b4fd95ae243d940ec64c961009c74e3333.zip
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: Julian Anastasov <ja@ssi.bg> Acked-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/ipvs/ip_vs_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 2555816e778..260b9ef8877 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1924,6 +1924,7 @@ protocol_fail:
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)