summaryrefslogtreecommitdiffstats
path: root/include/linux/mroute6.h
diff options
context:
space:
mode:
authorBenjamin Thery <benjamin.thery@bull.net>2008-12-10 16:30:15 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-10 16:30:15 -0800
commit8229efdaef1e7913ae1712c0ba752f267e5fcd5e (patch)
treeba85dabf90f17b1b735fb8dda4b9bb11c5cd445d /include/linux/mroute6.h
parent8b90fc7e5b43aaef941044a4785a42439015b539 (diff)
downloadop-kernel-dev-8229efdaef1e7913ae1712c0ba752f267e5fcd5e.zip
op-kernel-dev-8229efdaef1e7913ae1712c0ba752f267e5fcd5e.tar.gz
netns: ip6mr: enable namespace support in ipv6 multicast forwarding code
This last patch makes the appropriate changes to use and propagate the network namespace where needed in IPv6 multicast forwarding code. This consists mainly in replacing all the remaining init_net occurences with current netns pointer retrieved from sockets, net devices or mfc6_caches depending on the routines' contexts. Some routines receive a new 'struct net' parameter to propagate the current netns: * ip6mr_get_route * ip6mr_cache_report * ip6mr_cache_find * ip6mr_cache_unresolved * mif6_add/mif6_delete * ip6mr_mfc_add/ip6mr_mfc_delete * ip6mr_reg_vif All the IPv6 multicast forwarding variables moved to struct netns_ipv6 by the previous patches are now referenced in the correct namespace. Changelog: ========== * Take into account the net associated to mfc6_cache when matching entries in mfc_unres_queue list. * Call mroute_clean_tables() in ip6mr_net_exit() to free memory allocated per-namespace. * Call dev_net_set() in ip6mr_reg_vif() to initialize dev->nd_net correctly. 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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h
index 15d85fe..5375fac 100644
--- a/include/linux/mroute6.h
+++ b/include/linux/mroute6.h
@@ -245,7 +245,8 @@ void mfc6_net_set(struct mfc6_cache *mfc, struct net *net)
#ifdef __KERNEL__
struct rtmsg;
-extern int ip6mr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait);
+extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
+ struct rtmsg *rtm, int nowait);
#ifdef CONFIG_IPV6_MROUTE
static inline struct sock *mroute6_socket(struct net *net)
OpenPOWER on IntegriCloud