ipv6: ip6mr: move unres_queue and timer to per-namespace data
The unres_queue is currently shared between all namespaces. Following patches
will additionally allow to create multiple multicast routing tables in each
namespace. Having a single shared queue for all these users seems to excessive,
move the queue and the cleanup timer to the per-namespace data to unshare it.
As a side-effect, this fixes a bug in the seq file iteration functions: the
first entry returned is always from the current namespace, entries returned
after that may belong to any namespace.
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
index 1f11ebc..43d842a 100644
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
@@ -60,6 +60,8 @@
struct sock *igmp_sk;
#ifdef CONFIG_IPV6_MROUTE
struct sock *mroute6_sk;
+ struct timer_list ipmr_expire_timer;
+ struct mfc6_cache *mfc6_unres_queue;
struct mfc6_cache **mfc6_cache_array;
struct mif_device *vif6_table;
int maxvif;