login
Header Space

 
 

[net-2.6 patch 2/2][NETNS] Fix reassembly timer to use the right namespace

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <davem@...>
Cc: <netdev@...>
Date: Wednesday, April 30, 2008 - 5:31 pm

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>
---
 net/ipv6/reassembly.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: net-2.6/net/ipv6/reassembly.c
===================================================================
--- net-2.6.orig/net/ipv6/reassembly.c
+++ net-2.6/net/ipv6/reassembly.c
@@ -197,6 +197,7 @@ static void ip6_frag_expire(unsigned lon
 {
 	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 lon
 
 	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;
 

-- 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[net-2.6 patch 2/2][NETNS] Fix reassembly timer to use the r..., Daniel Lezcano, (Wed Apr 30, 5:31 pm)
speck-geostationary