From: Daniel Lezcano <dlezcano@fr.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [net-2.6 patch 2/2][NETNS] Fix reassembly timer to use the right namespace
Date: Wed, 30 Apr 2008 23:31:15 +0200 [thread overview]
Message-ID: <20080430213322.234776390@localhost.localdomain> (raw)
In-Reply-To: 20080430213113.410541118@localhost.localdomain
[-- Attachment #1: fix-reassembly-timer.patch --]
[-- Type: text/plain, Size: 920 bytes --]
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;
--
next prev parent reply other threads:[~2008-04-30 21:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 21:31 [net-2.6 patch 0/2][NETNS] netns fixes Daniel Lezcano
2008-04-30 21:31 ` [net-2.6 patch 1/2][NETNS] fix device renaming for sysfs Daniel Lezcano
2008-05-03 0:01 ` David Miller
2008-06-04 11:59 ` Eric W. Biederman
2008-06-04 13:50 ` Daniel Lezcano
2008-04-30 21:31 ` Daniel Lezcano [this message]
2008-05-03 0:02 ` [net-2.6 patch 2/2][NETNS] Fix reassembly timer to use the right namespace David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080430213322.234776390@localhost.localdomain \
--to=dlezcano@fr.ibm.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).