diff options
author | Benjamin Thery <benjamin.thery@bull.net> | 2008-12-10 16:07:08 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-10 16:07:08 -0800 |
commit | bd91b8bf372911c1e4d66d6bb44fe409349a6791 (patch) | |
tree | 18a79fc3c86ad833523562d7b73a9a557207b51b /include/linux/mroute6.h | |
parent | 5eaa65b240c5eb7bf2235eb9dd177c83e6e3832c (diff) | |
download | linux-bd91b8bf372911c1e4d66d6bb44fe409349a6791.tar.gz linux-bd91b8bf372911c1e4d66d6bb44fe409349a6791.tar.bz2 linux-bd91b8bf372911c1e4d66d6bb44fe409349a6791.zip |
netns: ip6mr: allocate mroute6_socket per-namespace.
Preliminary work to make IPv6 multicast forwarding netns-aware.
Make IPv6 multicast forwarding mroute6_socket per-namespace,
moves it into struct netns_ipv6.
At the moment, mroute6_socket is only referenced in init_net.
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mroute6.h')
-rw-r--r-- | include/linux/mroute6.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 6f4c180179e2..2cd9901ee5c7 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h @@ -117,6 +117,7 @@ struct sioc_mif_req6 #include <linux/pim.h> #include <linux/skbuff.h> /* for struct sk_buff_head */ +#include <net/net_namespace.h> #ifdef CONFIG_IPV6_MROUTE static inline int ip6_mroute_opt(int opt) @@ -232,10 +233,13 @@ struct rtmsg; extern int ip6mr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait); #ifdef CONFIG_IPV6_MROUTE -extern struct sock *mroute6_socket; +static inline struct sock *mroute6_socket(struct net *net) +{ + return net->ipv6.mroute6_sk; +} extern int ip6mr_sk_done(struct sock *sk); #else -#define mroute6_socket NULL +static inline struct sock *mroute6_socket(struct net *net) { return NULL; } static inline int ip6mr_sk_done(struct sock *sk) { return 0; } #endif #endif |