ipv4: ipmr: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy
2010-04-13 05:03:19 +00:00
committed by David S. Miller
parent f74e49b561
commit e258beb22f
2 changed files with 31 additions and 41 deletions

View File

@@ -60,6 +60,8 @@ struct netns_ipv4 {
#ifdef CONFIG_IP_MROUTE
struct sock *mroute_sk;
struct timer_list ipmr_expire_timer;
struct mfc_cache *mfc_unres_queue;
struct mfc_cache **mfc_cache_array;
struct vif_device *vif_table;
int maxvif;