netns: ip6mr: dynamically allocate mfc6_cache_array

Preliminary work to make IPv6 multicast forwarding netns-aware.

Dynamically allocates IPv6 multicast forwarding cache, mfc6_cache_array,
and moves it to struct netns_ipv6. 

At the moment, mfc6_cache_array is only referenced in init_net.

Replace 'ARRAY_SIZE(mfc6_cache_array)' with mfc6_cache_array size: MFC6_LINES.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Benjamin Thery
2008-12-10 16:24:07 -08:00
committed by David S. Miller
parent 58701ad411
commit 4a6258a0e3
2 changed files with 32 additions and 16 deletions

View File

@@ -57,6 +57,7 @@ struct netns_ipv6 {
struct sock *igmp_sk;
#ifdef CONFIG_IPV6_MROUTE
struct sock *mroute6_sk;
struct mfc6_cache **mfc6_cache_array;
struct mif_device *vif6_table;
int maxvif;
#endif