Commit 4ac2ccd0 authored by Daniel Lezcano's avatar Daniel Lezcano Committed by David S. Miller

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: default avatarDaniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aaf8cdc3
...@@ -197,6 +197,7 @@ static void ip6_frag_expire(unsigned long data) ...@@ -197,6 +197,7 @@ static void ip6_frag_expire(unsigned long data)
{ {
struct frag_queue *fq; struct frag_queue *fq;
struct net_device *dev = NULL; struct net_device *dev = NULL;
struct net *net;
fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q); fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
...@@ -207,7 +208,8 @@ static void ip6_frag_expire(unsigned long data) ...@@ -207,7 +208,8 @@ static void ip6_frag_expire(unsigned long data)
fq_kill(fq); 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) if (!dev)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment