diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-05-03 02:02:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-03 02:02:03 +0200 |
commit | 4ac2ccd01646e08d7176185c94e5b19404a25998 (patch) | |
tree | 79383a61dce3bd1c29bc6a27b9d17633dca72ac0 /net | |
parent | netns: Fix device renaming for sysfs (diff) | |
download | linux-4ac2ccd01646e08d7176185c94e5b19404a25998.tar.xz linux-4ac2ccd01646e08d7176185c94e5b19404a25998.zip |
netns: Fix reassembly timer to use the right namespace
This trivial fix retrieves the network namespace from frag queue
and use it to get the network device in the right namespace.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/reassembly.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 7b247e3a16fe..798cabc7535b 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c @@ -197,6 +197,7 @@ static void ip6_frag_expire(unsigned long data) { struct frag_queue *fq; struct net_device *dev = NULL; + struct net *net; fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q); @@ -207,7 +208,8 @@ static void ip6_frag_expire(unsigned long data) fq_kill(fq); - dev = dev_get_by_index(&init_net, fq->iif); + net = container_of(fq->q.net, struct net, ipv6.frags); + dev = dev_get_by_index(net, fq->iif); if (!dev) goto out; |