aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-05-02 20:02:03 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-02 20:02:03 -0400
commit4ac2ccd01646e08d7176185c94e5b19404a25998 (patch)
tree79383a61dce3bd1c29bc6a27b9d17633dca72ac0
parentaaf8cdc34ddba08122f02217d9d684e2f9f5d575 (diff)
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>
-rw-r--r--net/ipv6/reassembly.c4
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)
197{ 197{
198 struct frag_queue *fq; 198 struct frag_queue *fq;
199 struct net_device *dev = NULL; 199 struct net_device *dev = NULL;
200 struct net *net;
200 201
201 fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q); 202 fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
202 203
@@ -207,7 +208,8 @@ static void ip6_frag_expire(unsigned long data)
207 208
208 fq_kill(fq); 209 fq_kill(fq);
209 210
210 dev = dev_get_by_index(&init_net, fq->iif); 211 net = container_of(fq->q.net, struct net, ipv6.frags);
212 dev = dev_get_by_index(net, fq->iif);
211 if (!dev) 213 if (!dev)
212 goto out; 214 goto out;
213 215