diff options
author | Hans Schillstrom <hans.schillstrom@ericsson.com> | 2011-01-03 14:45:03 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-01-13 10:30:29 +0900 |
commit | c6d2d445d8dee04cde47eb4021636399a4239e9f (patch) | |
tree | 3f1aa27ea7e60ed97d3039b02c6a08e68425a186 /net/netfilter/ipvs/ip_vs_ctl.c | |
parent | 4a98480bccc2f5998c5564d254392635b9aa04c2 (diff) | |
download | op-kernel-dev-c6d2d445d8dee04cde47eb4021636399a4239e9f.zip op-kernel-dev-c6d2d445d8dee04cde47eb4021636399a4239e9f.tar.gz |
IPVS: netns, final patch enabling network name space.
all init_net removed, (except for some alloc related
that needs to be there)
Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net/netfilter/ipvs/ip_vs_ctl.c')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index edf2b6d..09ca2ce 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -2617,6 +2617,7 @@ static struct genl_family ip_vs_genl_family = { .name = IPVS_GENL_NAME, .version = IPVS_GENL_VERSION, .maxattr = IPVS_CMD_MAX, + .netnsok = true, /* Make ipvsadm to work on netns */ }; /* Policy used for first-level command attributes */ @@ -3483,9 +3484,6 @@ int __net_init __ip_vs_control_init(struct net *net) struct netns_ipvs *ipvs = net_ipvs(net); struct ctl_table *tbl; - if (!net_eq(net, &init_net)) /* netns not enabled yet */ - return -EPERM; - atomic_set(&ipvs->dropentry, 0); spin_lock_init(&ipvs->dropentry_lock); spin_lock_init(&ipvs->droppacket_lock); @@ -3578,9 +3576,6 @@ static void __net_exit __ip_vs_control_cleanup(struct net *net) { struct netns_ipvs *ipvs = net_ipvs(net); - if (!net_eq(net, &init_net)) /* netns not enabled yet */ - return; - ip_vs_trash_cleanup(net); ip_vs_kill_estimator(net, ipvs->tot_stats); cancel_delayed_work_sync(&ipvs->defense_work); |