mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
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>
This commit is contained in:
parent
1da465683a
commit
e05b31f4bf
6 changed files with 43 additions and 33 deletions
|
@ -50,11 +50,11 @@ void tipc_sock_release_local(struct socket *sock);
|
|||
int tipc_sock_accept_local(struct socket *sock, struct socket **newsock,
|
||||
int flags);
|
||||
int tipc_sk_rcv(struct net *net, struct sk_buff *buf);
|
||||
struct sk_buff *tipc_sk_socks_show(void);
|
||||
struct sk_buff *tipc_sk_socks_show(struct net *net);
|
||||
void tipc_sk_mcast_rcv(struct net *net, struct sk_buff *buf);
|
||||
void tipc_sk_reinit(void);
|
||||
int tipc_sk_rht_init(void);
|
||||
void tipc_sk_rht_destroy(void);
|
||||
void tipc_sk_reinit(struct net *net);
|
||||
int tipc_sk_rht_init(struct net *net);
|
||||
void tipc_sk_rht_destroy(struct net *net);
|
||||
int tipc_nl_sk_dump(struct sk_buff *skb, struct netlink_callback *cb);
|
||||
int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue