aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/net.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-01-09 15:27:08 +0800
committerDavid S. Miller <davem@davemloft.net>2015-01-12 16:24:33 -0500
commite05b31f4bf8994d49322e9afb004ad479a129db0 (patch)
tree7d413a68ee6fdc5ca81b2eec93323433e61753a8 /net/tipc/net.c
parenttipc: make tipc broadcast link support net namespace (diff)
downloadlinux-dev-e05b31f4bf8994d49322e9afb004ad479a129db0.tar.xz
linux-dev-e05b31f4bf8994d49322e9afb004ad479a129db0.zip
tipc: make tipc socket support net namespace
Now tipc socket table is statically allocated as a global variable. Through it, we can look up one socket instance with port ID, insert a new socket instance to the table, and delete a socket from the table. But when tipc supports net namespace, each namespace must own its specific socket table. So the global variable of socket table must be redefined in tipc_net structure. As a concequence, a new socket table will be allocated when a new namespace is created, and a socket table will be deallocated when namespace is destroyed. Signed-off-by: Ying Xue <ying.xue@windriver.com> Tested-by: Tero Aho <Tero.Aho@coriant.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r--net/tipc/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c
index 7548ba80d289..44ccf47c79a3 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -117,7 +117,7 @@ int tipc_net_start(struct net *net, u32 addr)
tipc_own_addr = addr;
tipc_named_reinit();
- tipc_sk_reinit();
+ tipc_sk_reinit(net);
res = tipc_bclink_init(net);
if (res)
return res;